Skip to content

Commit

Permalink
Merge pull request realm#1792 from realm/jp-refactor-issue-template
Browse files Browse the repository at this point in the history
Split up issue template in "rule request" and "bug report" sections
  • Loading branch information
jpsim authored Aug 21, 2017
2 parents e57914d + 661eb51 commit 4f7a098
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
30 changes: 22 additions & 8 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,45 @@
- [ ] Updated SwiftLint to the latest version
- [ ] I searched for [existing GitHub issues](https://github.com/realm/SwiftLint/issues)

### Issue Description
### Rule Request

(If this is a new rule request, please ignore everything below.)
If this is a bug report, please ignore this section.

If this is a new rule request, please ignore all sections below this one, format
this issue's title as `Rule Request: [Rule Name]` and describe:

1. Why should this rule be added? Share links to existing discussion about what
the community thinks about this.
2. Provide several examples of what _would_ and _wouldn't_ trigger violations.
3. Should the rule be configurable, if so what parameters should be configurable?
4. Should the rule be opt-in or enabled by default? Why?
See [README.md](../README.md#opt-in-rules) for guidelines on when to mark a
rule as opt-in.

### Bug Report

##### Complete output when running SwiftLint, including the stack trace and command used

```
```bash
$ swiftlint lint
```

### Environment

* SwiftLint version (run `swiftlint version` to be sure)?
* Installation method used (Homebrew, CocoaPods, building the source, etc)?
* Installation method used (Homebrew, CocoaPods, building from source, etc)?
* Paste your configuration file:

```yml
included:
- you should change this
# insert yaml contents here
```

* Are you using [nested configurations](https://github.com/realm/SwiftLint#nested-configurations)?
If so, paste their relative paths and respective contents.
* Which Xcode version are you using (check `xcode-select -p`)?
* Do you have a sample example that shows the issue? You can run `echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rules` to quickly test if your example is really demonstrating the issue.
If your example is a more complex one, you can use `swiftlint lint --path [file here] --no-cache --enable-all-rules`.
* Do you have a sample that shows the issue? Run `echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rules`
to quickly test if your example is really demonstrating the issue. If your example is more
complex, you can use `swiftlint lint --path [file here] --no-cache --enable-all-rules`.

```swift
// This triggers a violation:
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,16 +206,18 @@ Over 75 rules are included in SwiftLint and the Swift community (that's you!)
continues to contribute more over time.
[Pull requests](CONTRIBUTING.md) are encouraged.

You can find an updated list of rules and more information about them
You can find an updated list of rules and more information about them
in [Rules.md](Rules.md).

You can also check [Source/SwiftLintFramework/Rules](Source/SwiftLintFramework/Rules)
directory to see their implementation.

### Opt-In Rules

`opt_in_rules` are disabled by default (i.e., you have to explicitly enable them
in your configuration file).

Guidelines on when to implement a rule as opt-in:
Guidelines on when to mark a rule as opt-in:

* A rule that can have many false positives (e.g. `empty_count`)
* A rule that is too slow
Expand Down

0 comments on commit 4f7a098

Please sign in to comment.