-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add options to exclude files #238
Changes from 9 commits
e7dda32
16910d1
dcb40dc
f93c38b
3e9af68
db57eaa
f8ca08d
6d7216e
7f71ff7
cb95f79
e921ae7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,6 +152,36 @@ preview = true | |
|
||
Run `fortitude explain` to see which rules are in preview mode. | ||
|
||
### Excluding Files | ||
|
||
> [!NOTE] | ||
> To be featured in v0.7.0 | ||
|
||
Fortitude will automatically ignore files in some directories (`build/`, `.git/`, | ||
`.venv/`, etc.), and this behaviour can be extended using the `--exclude` option. For | ||
example, to ignore all files in the directory `benchmarks/`: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, does There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From playing around with Ruff, apparently not, as it behaves as if the built-ins are a mandatory set of I haven't played around with |
||
|
||
```console | ||
$ fortitude check --exclude=benchmarks | ||
``` | ||
|
||
Note that this will override any exclusions specified in your `fpm.toml` or | ||
`fortitude.toml` file. To extend those exclusions, use instead: | ||
|
||
```console | ||
$ fortitude check --extend-exclude=benchmarks | ||
``` | ||
|
||
It is also possible to switch off individual rules or rule categories for specific | ||
files using `--per-file-ignores`: | ||
|
||
```console | ||
$ fortitude check --per-file-ignores=**/*.f95:non-standard-file-extension | ||
``` | ||
|
||
Similarly, if these are set in the configuration file, `--extend-per-file-ignores` can | ||
be used to add additional rule ignores instead of overwriting them. | ||
|
||
## Configuration | ||
|
||
Fortitude will look for either a `fortitude.toml` or `fpm.toml` file in the | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe instead this should be in
docs/index.md
?Actually, looking at ruff, they have some tools for extracting portions of the
README.md
into the site docs. We should look at that at some pointThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, I've moved that section to the docs along with some other things from the README.