Comments (2)
It would also be really cool if the linter could skip over a file if there are no rules enable for a given file. Currently it seems all files are visited regardless of if a rule is enabled or not!
from fixit.
As a CLI flag, this is simple: we can pass an exclude
kwarg to trailrunner.walk(...)
to apply excludes when walking. This would be a relatively straightforward PR adding an appropriate exclude_paths
value to the Options
dataclass and then passing that to trailrunner.
Providing this from a config file will be a bit more tricky, since we would need to materialize configs for each candidate path before we can exclude them, and that normally only happens in fixit_file
after we already have spawned child processes. It might be useful instead to move towards materializing configs in fixit_paths
based on the parent directory, use that when walking to exclude paths, and then pass those configs through to fixit_file
.
This would also have the benefit of frontloading disk access, allow more caching of config objects, and give us access to the materialized set of lint rules for each file in the main process, which would enable work for #321 to preform warmup before spawning child processes.
from fixit.
Related Issues (20)
- A way to show silenced errors
- `lint-fixme` comments not respected HOT 3
- fixit upgrade makes incomplete fix, second run results in metadata error HOT 1
- Support Glob Patterns in `[[tool.fixit.overrides]]` HOT 2
- `fixit fix` exits with `0` even if there were errors HOT 2
- Support multiple paths in overrides block
- QUESTION: Can fixit be used for languages other than Python? HOT 1
- Use formal specification for license field in pyproject.toml HOT 1
- Add options to ignore directories HOT 1
- Autofix does not work with "black" formatter if black formatter changes nothing
- add slots=True to the dataclass replacing named tuples.
- Problem configuring custom rules in pre-commit.
- lsp: tracking issue for code actions features
- Access to rule options
- Allow dicts and lists in rule options
- Fixit can be incredibly slow. Are there any recommendations available for profiling checks? HOT 8
- Fixit is incredibly slow with many files.
- Is there a way to detect from within a LintRule if it's being run under test? HOT 1
- ChatBox _ UI _ The ChatBox UI has incorrect alignment, and the last reels were not refreshed. HOT 1
- False negatives with Python3.13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fixit.