From fbe6cc998b9881131bf5eabb400522d4298ae0c1 Mon Sep 17 00:00:00 2001 From: Dmitry Zhifarsky Date: Sun, 29 Jan 2023 20:46:25 +0400 Subject: [PATCH 1/3] chore: update issue templates --- .github/ISSUE_TEMPLATE/change.yml | 43 ++++++++++++++ .github/ISSUE_TEMPLATE/new-rule-proposal.md | 31 ---------- .github/ISSUE_TEMPLATE/new-rule.yml | 43 ++++++++++++++ .github/ISSUE_TEMPLATE/question.md | 13 ---- .github/ISSUE_TEMPLATE/question.yml | 8 +++ .../ISSUE_TEMPLATE/rule-change-proposal.md | 28 --------- .github/ISSUE_TEMPLATE/rule-change.yml | 59 +++++++++++++++++++ 7 files changed, 153 insertions(+), 72 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/change.yml delete mode 100644 .github/ISSUE_TEMPLATE/new-rule-proposal.md create mode 100644 .github/ISSUE_TEMPLATE/new-rule.yml delete mode 100644 .github/ISSUE_TEMPLATE/question.md create mode 100644 .github/ISSUE_TEMPLATE/question.yml delete mode 100644 .github/ISSUE_TEMPLATE/rule-change-proposal.md create mode 100644 .github/ISSUE_TEMPLATE/rule-change.yml diff --git a/.github/ISSUE_TEMPLATE/change.yml b/.github/ISSUE_TEMPLATE/change.yml new file mode 100644 index 0000000000..d9405acbb8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/change.yml @@ -0,0 +1,43 @@ +name: "Request a change (not rule-related)" +description: "Request a change that is not a bug fix, rule change, or new rule" +title: "[Change request] (fill in)" +labels: + - "type: enhancement" +body: + - type: input + attributes: + label: DCM version + description: | + What version of DCM are you currently using? + placeholder: | + e.g. v8.0.0 + validations: + required: true + - type: textarea + attributes: + label: What problem do you want to solve? + description: | + Please explain your use case in as much detail as possible. + placeholder: | + DCM currently... + validations: + required: true + - type: textarea + attributes: + label: What do you think is the correct solution? + description: | + Please explain how you'd like to change DCM to address the problem. + placeholder: | + I'd like DCM to... + validations: + required: true + - type: checkboxes + attributes: + label: Participation + options: + - label: I am willing to submit a pull request for this change. + required: false + - type: textarea + attributes: + label: Additional comments + description: Is there anything else that's important for the team to know? diff --git a/.github/ISSUE_TEMPLATE/new-rule-proposal.md b/.github/ISSUE_TEMPLATE/new-rule-proposal.md deleted file mode 100644 index 854814e989..0000000000 --- a/.github/ISSUE_TEMPLATE/new-rule-proposal.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: New rule proposal -about: Propose a new rule. -title: "[New rule] " -labels: enhancement -assignees: dkrutskikh, incendial ---- - - - -**Please describe what the rule should do:** - -**If your rule is inspired by other please provide link to it:** - -**What category of rule is this? (place an "X" next to just one item)** - -- [ ] Warns about a potential error (problem) -- [ ] Suggests an alternate way of doing something (suggestion) -- [ ] Other (please specify:) - -**Provide 2-3 code examples that this rule will warn about (it will be better if you can provide both good and bad examples):** - - - -```dart - -``` - -**Are you willing to submit a pull request to implement this rule?** diff --git a/.github/ISSUE_TEMPLATE/new-rule.yml b/.github/ISSUE_TEMPLATE/new-rule.yml new file mode 100644 index 0000000000..00757587df --- /dev/null +++ b/.github/ISSUE_TEMPLATE/new-rule.yml @@ -0,0 +1,43 @@ +name: "New rule proposal" +description: "Propose a new rule." +title: "[New rule] (fill in)" +assignees: incendial +labels: + - area-rules + - "type: enhancement" +body: + - type: markdown + attributes: + value: Thank you for your lint idea! + - type: textarea + attributes: + label: Rule details + description: What should the new rule do? + validations: + required: true + - type: dropdown + attributes: + label: What type of rule is this? + options: + - Warns about a potential problem + - Suggests an alternate way of doing something + - Enforces a formatting/stylistic preference + validations: + required: true + - type: textarea + attributes: + label: Example code + description: Please provide some example Dart code that this rule will warn about. This field will render as Dart. + render: dart + validations: + required: true + - type: checkboxes + attributes: + label: Participation + options: + - label: I am willing to submit a pull request to implement this rule. + required: false + - type: textarea + attributes: + label: Additional comments + description: Is there anything else that's important for the team to know? diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index 391a4ff8d0..0000000000 --- a/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: Question -about: Please ask any question you have. -title: "[Question] " -labels: question -assignees: dkrutskikh, incendial ---- - - - -**What do you want to discuss?** diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml new file mode 100644 index 0000000000..8d9da8ce22 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -0,0 +1,8 @@ +name: "Ask a Question, Discuss" +description: "Get help using DCM." +title: "[Question] (fill in)" +assignees: incendial +labels: + - "type: question" +body: + - type: textarea diff --git a/.github/ISSUE_TEMPLATE/rule-change-proposal.md b/.github/ISSUE_TEMPLATE/rule-change-proposal.md deleted file mode 100644 index 46cfce5ba1..0000000000 --- a/.github/ISSUE_TEMPLATE/rule-change-proposal.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Rule change proposal -about: Request a change to an existing rule. -title: "[Rule change] " -labels: enhancement -assignees: dkrutskikh, incendial ---- - - - -**What rule do you want to change?** - -**How will the change be implemented? (New option, new default behavior, etc.)?** - -**Please provide some example code that this change will affect:** - - - -```dart -``` - -**What does the rule currently do for this code?** - -**What will the rule do after it's changed?** - -**Are you willing to submit a pull request to implement this change?** diff --git a/.github/ISSUE_TEMPLATE/rule-change.yml b/.github/ISSUE_TEMPLATE/rule-change.yml new file mode 100644 index 0000000000..079faf570a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/rule-change.yml @@ -0,0 +1,59 @@ +name: "Request a rule change" +description: "Request a change to an existing rule." +title: "[Rule change] (fill in)" +assignees: incendial +labels: + - area-rules + - "type: enhancement" +body: + - type: input + attributes: + label: What rule do you want to change? + validations: + required: true + - type: dropdown + attributes: + label: What change to do you want to make? + options: + - Generate more warnings + - Generate fewer warnings + - Implement autofix + - Implement suggestions + validations: + required: true + - type: dropdown + attributes: + label: How do you think the change should be implemented? + options: + - A new option + - A new default behavior + - Other + validations: + required: true + - type: textarea + attributes: + label: Example code + description: Please provide some example code that this change will affect. This field will render as Dart. + render: dart + validations: + required: true + - type: textarea + attributes: + label: What does the rule currently do for this code? + validations: + required: true + - type: textarea + attributes: + label: What will the rule do after it's changed? + validations: + required: true + - type: checkboxes + attributes: + label: Participation + options: + - label: I am willing to submit a pull request to implement this change. + required: false + - type: textarea + attributes: + label: Additional comments + description: Is there anything else that's important for the team to know? From becde061b225ec3707d61356e14363f918ef6518 Mon Sep 17 00:00:00 2001 From: Dmitry Zhifarsky Date: Sun, 29 Jan 2023 21:00:49 +0400 Subject: [PATCH 2/3] chore: update PR template --- .github/ISSUE_TEMPLATE/new-rule.yml | 2 +- .github/ISSUE_TEMPLATE/question.yml | 2 +- .github/ISSUE_TEMPLATE/rule-change.yml | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 44 +++++++++++++++----------- 4 files changed, 28 insertions(+), 22 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/new-rule.yml b/.github/ISSUE_TEMPLATE/new-rule.yml index 00757587df..e34f50a7c9 100644 --- a/.github/ISSUE_TEMPLATE/new-rule.yml +++ b/.github/ISSUE_TEMPLATE/new-rule.yml @@ -1,5 +1,5 @@ name: "New rule proposal" -description: "Propose a new rule." +description: "Propose a new rule" title: "[New rule] (fill in)" assignees: incendial labels: diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml index 8d9da8ce22..5e9d020a69 100644 --- a/.github/ISSUE_TEMPLATE/question.yml +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -1,5 +1,5 @@ name: "Ask a Question, Discuss" -description: "Get help using DCM." +description: "Get help using DCM" title: "[Question] (fill in)" assignees: incendial labels: diff --git a/.github/ISSUE_TEMPLATE/rule-change.yml b/.github/ISSUE_TEMPLATE/rule-change.yml index 079faf570a..2d7407ba93 100644 --- a/.github/ISSUE_TEMPLATE/rule-change.yml +++ b/.github/ISSUE_TEMPLATE/rule-change.yml @@ -1,5 +1,5 @@ name: "Request a rule change" -description: "Request a change to an existing rule." +description: "Request a change to an existing rule" title: "[Rule change] (fill in)" assignees: incendial labels: diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c536eb9fd2..4c69e0f71d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,28 +2,34 @@ Thank you for contributing! --> -### What is the purpose of this pull request? (put an "X" next to an item) +If your PR fixes an issue, you can add `#issue_number` into this +PR description. Please don't reference the issue with `closes` (or other) syntax +since we close the issues only after the code is released. -- [ ] Documentation update -- [ ] Bug fix -- [ ] New rule -- [ ] Changes an existing rule -- [ ] Add autofixing to a rule -- [ ] Add a CLI option -- [ ] Add something to the core -- [ ] Other, please explain: +If you added a new lint rule, here's a checklist for things that will be +checked during review or continuous integration. - +- \[ ] Red the [contributing guidelines](https://github.com/dart-code-checker/dart-code-metrics/blob/master/CONTRIBUTING.md). +- \[ ] Followed lint naming conventions +- \[ ] Tests pass locally +- \[ ] Updated the changelog - +Since the website was moved out from this repo, please add the rule documentation in the description. +Refer to [this documentation](https://dcm.dev/docs/individuals/rules/common/format-comment/) as an example. + +Delete this line and everything above before opening your PR. + +--- + +# Please write a short comment explaining your change (or "none" for internal only changes) + +## Rule documentation + +### Config example (if applicable) -### What changes did you make? (Give an overview) +### Good example -### Is there anything you'd like reviewers to focus on? +### Bad example From 6020f97a147a7f17d5fcb470b5e08cffe1b3d78c Mon Sep 17 00:00:00 2001 From: Dmitry Zhifarsky Date: Sun, 29 Jan 2023 21:03:03 +0400 Subject: [PATCH 3/3] chore: update PR template --- .github/PULL_REQUEST_TEMPLATE.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4c69e0f71d..8f0c6f4d49 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -13,6 +13,7 @@ checked during review or continuous integration. - \[ ] Followed lint naming conventions - \[ ] Tests pass locally - \[ ] Updated the changelog +- \[ ] Added the docs to this PR Note that you can skip the above if you are just opening a WIP PR in order to get feedback. @@ -26,6 +27,9 @@ Delete this line and everything above before opening your PR. # Please write a short comment explaining your change (or "none" for internal only changes) +