Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JosefDvorak committed Jan 8, 2024
2 parents 6326abf + e6d687d commit a6174a6
Show file tree
Hide file tree
Showing 569 changed files with 39,516 additions and 39,125 deletions.
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Users referenced in this file will automatically be requested as reviewers for PRs that modify the given paths.
# See https://help.github.com/articles/about-code-owners/

* @JosefDvorak
* @kentico-ericd
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help us improve

---

### Brief bug description

What went wrong?

### Repro steps

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

### Expected behavior

What the correct behavior is?

### Test environment

- Platform/OS: [e.g. .NET Core 2.1, iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

### Additional context

Add any other context about the problem here.

### Screenshots

Add links to screenshots, if possible.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

---

### Motivation

Why is this feature required? What problems does it solve?

### Proposed solution

An ideal solution for the above problems.

### Additional context

Add any other context, screenshots, or reference links about the feature request here.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/migration_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: V3->V4 Report Migration
about: Request a V3 module be migrated to V4

---

### Overview
We should migrate the [MODULE_NAME](LINK_TO_MODULE_CODE_FILE) module to the new V4 report format.

### Definition of done
- [ ] Code and Scripts are ported to `KenticoInspector.Reports` project in a dedicated folder for the report.
- [ ] Scripts are referenced via constants in a static class.
- [ ] Scripts are refactored to return simple results that are mappable to simple classes.
- [ ] Report logic is covered by unit test for a clean result
- [ ] Report logic is covered by unit tests for all known dirty results
- [ ] Useful, non-specific logic is abstracted to services or helpers.

_Note: The [Class/Table Validation report](https://github.com/Kentico/KInspector/tree/v4-dev/KenticoInspector.Reports/ClassTableValidation) (and it's [tests](https://github.com/Kentico/KInspector/blob/v4-dev/KenticoInspector.Reports.Tests/ClassTableValidationTests.cs)) is a good, simple example of the main concepts._

### Additional Details
- New name: __NAME__
- Tags: __tag 1, tag 2__
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Question
about: Ask a question

---

### Question

What do you want to ask?

### Reference

* URL
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/spike.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Spike
about: Suggest an analysis of a problem

---

### Expected result

What do we want to explore and why? Which questions do we want to answer with this spike?

### Additional context

Add any other context or guidelines here.

### Resources

* URL
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
### Motivation

Which issue does this fix? Fixes #`issue number`

If no issue exists, what is the fix or new feature? Were there any reasons to fix/implement things that are not obvious?

### Checklist

- [ ] Code follows coding conventions held in this repo
- [ ] Automated tests have been added
- [ ] Tests are passing
- [ ] Docs have been updated (if applicable)
- [ ] Temporary settings (e.g. variables used during development and testing) have been reverted to defaults

### How to test

If manual testing is required, what are the steps?
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
# *.pubxml
*.publishproj

# NuGet Packages
Expand Down Expand Up @@ -194,3 +194,6 @@ FakesAssemblies/

# Visual Studio 6 workspace options file
*.opt

# Kentico Inspector Specifics
KenticoInspector.WebApplication/SavedInstances.json
59 changes: 59 additions & 0 deletions BestPractices.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
## SQL scripts
- Use SQL Formatting tool: <link to tool>

## Metadata
- Name reports _Sentence case_
- Use bold format for Kentico application names using `**{ApplicationName}**`
- Use code format for code snippets using `{Code}`
- Write `shortDescription` as a one sentence description of report purpose
- Write `longDescription` as a detailed description of what the report does
- `longDescription` should not duplicate `shortDescription` (due to how it appears in the UI)
- Sort all terms alphabetically
- Define summaries under a property named `summaries`
- Name Summary title model class `Summaries`
- Recommended: Name summary terms following `[information|good|error|warning]`
- Define table titles under a property named `tableTitles`
- Name Table title model class `TableTitles`

## Code formatting
- Use <tool> to format code
- Use `static`, `readonly`, and remove `set`ters where possible
- Use descriptive names.
- `coupledDataItem` is better than `item`
- <method example>
- Use declarative instead of interrogative naming of variables (ex. documentIsValid is better than isDocumentValid)
- When line exceeds ~120 characters put all parameters and the closing parenthesis on their own lines
- Indent each level of LINQ one tab from previous line
- Use `Any()` instead of `Count() > 0`
- Properties should be ordered alphabetically in an object initializer
- Recommended: Limit methods to 10-20 lines

## Reports
- Organize `GetResults` following "get SQL data, filter data, call `CompileResults` with results class parameters"
- Use static, functional data flow between `GetResults` and `CompileResults`
- When passing anonymous objects pass them implicitly
- Return separate `ReportResults` objects for each status rather than modifying a shared object

## Data
- Place data classes under `Models\Data`
- Match data class property types to column data (`string`, `int`, `DateTime`, `XDocument`)
- Name data class `{PascalCase table name or logical object name without underscores}`
- Use `Cms` prefix when referring to CMS objects
- Table name example: CMS_User: `CmsUser`
- Logical name example: View_CMS_Tree_Joined: `CmsDocument`
- Use method-style naming for SQL scripts
- Data retrieval patterns: `Get{DataClassName}{SummaryOfQuery}` or `Get{SummaryOfQuery}`
- Name data class property names to match table columns exactly

## Results
- Place results classes under `Models\Results`
- <define results class>
- Name results class `{DataObjectName}Result`
- Include ID column in all table results, where possible

## Tests
- Name test cases/methods following `Should_{Behavior}_When_{Case}`
- Name test data properties following `{ObjectName}[With|Without]{IssueDescription}`
- Match test data properties to database results as `IEnumerable<{DataClass}>`, except for special cases, even for "empty" data
- Use `Is.EqualTo()`, `Has.One.Member()`, or similar constraints
- Test cases should have a friendly name and category
48 changes: 48 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]

[homepage]: https://contributor-covenant.org
[version]: https://contributor-covenant.org/version/1/4/

![Analytics](https://kentico-ga-beacon.azurewebsites.net/api/UA-69014260-4/Kentico/Home/master/CODE_OF_CONDUCT.md?pixel)
73 changes: 71 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,72 @@
# Contributing guidelines
# Ways to contribute
<img align="right" width="100" height="100" src="https://i.imgur.com/PYTV0jP.png">

Take a look at our [general contribution guidelines](https://github.com/Kentico/Home/blob/master/CONTRIBUTING.md) and [readme](https://github.com/Kentico/Home/blob/master/README.md) in our [Home](https://github.com/Kentico/Home) repository.
There are many different ways in which you can contribute. One of the easiest ways is simply to use our software and provide us with your feedback through the right channel. You can also help us improve the open-source projects by submitting pull requests with code and documentation changes.

## Where to get support
Please note that **level of provided support is always determined by the [LICENSE](LICENSE.md)** of a given open-source project. Also, always make sure you use the **[latest version](../../releases)** of any given OS project. We can't provide any help for older versions. We don't want to make things complicated so we try to take the same approach in all our repositories.

### I found a bug in a Kentico's open-source project
<img align="right" width="100" height="100" src="https://i.imgur.com/TYIQdpv.png">

Sorry to hear that. Just log a new [GitHub issue](../../issues) and someone will take a look at it. Remember, the more information you provide, the easier it will be to fix the issue. If you feel like it, you can also fix the bug on your own and submit a new pull request.

### I need help with using the projects and/or coding
<img align="right" width="100" height="100" src="https://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-icon.svg">

To get help with coding and structuring your projects, use [StackOverflow](https://stackoverflow.com/) to ask questions with one of the following tags:
- [`kentico-cloud`](https://stackoverflow.com/questions/tagged/kentico-cloud)
- [`kentico`](https://stackoverflow.com/questions/tagged/kentico)

Our team members and the community monitor these channels on a regular basis.

### I want to report a security bug
<img align="right" width="100" height="100" src="https://i.imgur.com/z82nnJB.png">

Security issues and bugs should be reported privately, via email, to the Kentico Developer Community Team [email protected]. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message.


### I have an idea for a new feature (or feedback on existing functionality)
<img align="right" width="100" height="100" src="https://i.imgur.com/rUFkyPy.png">

Everybody loves new features! You can submit a new [feature request](../../issues) or you can code it on your own and [send us a pull request](#submitting-pull-requests). In either case, don't forget to mention what's the use case and what's the expected output.


## Submitting pull requests
<img align="right" width="100" height="100" src="https://i.imgur.com/aSeiliy.png">

Unless you're fixing a typo, it's usually a good idea to discuss the feature before you submit a pull request with code changes, so let's start with submitting a new [GitHub issue](../../issues) and discussing the whether it fits the vision of a given project.
You might also read these two blogs posts on contributing code: [Open Source Contribution Etiquette](http://tirania.org/blog/archive/2010/Dec-31.html) by Miguel de Icaza and [Don't "Push" Your Pull Requests](https://www.igvita.com/2011/12/19/dont-push-your-pull-requests/) by Ilya Grigorik. Note that all code submissions will be rigorously reviewed and tested by the Kentico Maintainers teams, and only those that meet an high bar for both quality and design/roadmap appropriateness will be merged into the source.


### Example - process of contribution
If not stated otherwise, we use [feature branch workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow).

To start with coding, fork the repository you want to contribute to, create a new branch, and start coding. Once the functionality is [done](#Definition-of-Done), you can submit a [pull request](https://help.github.com/articles/about-pull-requests/).

### Definition of Done
<img align="right" width="100" height="100" src="https://i.imgur.com/g82Ohdv.png">

- New/fixed code is covered with tests
- CI can build the code
- All tests are pass
- New version number follows [semantic versioning](https://semver.org/)
- Coding style (spaces, indentation) is in line with the rest of the code in a given repository
- Documentation is updated (e.g. code examples in README, Wiki pages, etc.)
- All `public` members are documented (using XML doc, phpdoc, etc.)
- Code doesn't contain any secrets (private keys, etc.)
- Commit messages are clear. Please read these articles: [Writing good commit messages](https://github.com/erlang/otp/wiki/Writing-good-commit-messages), [A Note About Git Commit Messages](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html), [On commit messages](https://who-t.blogspot.com/2009/12/on-commit-messages.html)


### Feedback
<img align="right" width="100" height="100" src="https://i.imgur.com/ZQfNzJJ.png">

Your pull request will now go through extensive checks by the subject matter experts on our team. Please be patient. Update your pull request according to feedback until it is approved by one of the Kentico maintainers. After that, one of our team members may adjust the branch you merge into based on the expected release schedule.


## Code of Conduct
<img align="right" width="100" height="100" src="https://i.imgur.com/cObdKQy.png">

The Kentico team is committed to fostering a welcoming community, therefore this project has adopted the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). If you have any additional questions or comments, you can contact us directly at [email protected].

![Analytics](https://kentico-ga-beacon.azurewebsites.net/api/UA-69014260-4/Kentico/Home/master/CONTRIBUTING.md?pixel)
Loading

0 comments on commit a6174a6

Please sign in to comment.