-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[2/n] no-context lint: migrate some crates #5640
Merged
Merged
Commits on Jul 28, 2023
-
Add project-specific lints with ast-grep
ast-grep[0] is a tool that uses tree-sitter[1] and a pattern language to match against code using its ast. It implements code transformation, querying, and linting. Since clippy isn't extensible for project-specific lints, this adds a first ast-grep lint disallowing `context` as a variable name. Currently it's set to warning as usage is addressed. To run, install ast-grep, then run `ast-grep scan`. Example output: ``` warning[no-context]: Don't name variables `context`. ┌─ ./crates/turbopack-ecmascript-hmr-protocol/src/lib.rs:132:9 │ 132 │ pub context: &'a str, │ ----^^^^^^^--------- │ = Use a more specific name, such as chunking_context, asset_context, etc. ``` [0] https://ast-grep.github.io [1] https://tree-sitter.github.io/tree-sitter/
Configuration menu - View commit details
-
Copy full SHA for dd35e08 - Browse repository at this point
Copy the full SHA dd35e08View commit details -
Configuration menu - View commit details
-
Copy full SHA for daa61bb - Browse repository at this point
Copy the full SHA daa61bbView commit details
Commits on Jul 29, 2023
-
[2/n] no-context lint: migrate some crates
This migrates some crates away from using `context`, specifically: - `node-file-trace` - `turbo-tasks-build` - `turbo-tasks-fetch` - `turbo-tasks` - `turbopack-build` - `turbopack-cli-utils` - `turbopack-cli` - `turbopack-core` - `turbopack-ecmascript` This also moves the lint to `error` and ignores other failing crates.
Configuration menu - View commit details
-
Copy full SHA for a2269d0 - Browse repository at this point
Copy the full SHA a2269d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 52a0281 - Browse repository at this point
Copy the full SHA 52a0281View commit details
Commits on Aug 1, 2023
-
Configuration menu - View commit details
-
Copy full SHA for e8bb13c - Browse repository at this point
Copy the full SHA e8bb13cView commit details
Commits on Aug 2, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 9b158e6 - Browse repository at this point
Copy the full SHA 9b158e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for b36f2b5 - Browse repository at this point
Copy the full SHA b36f2b5View commit details
Commits on Aug 3, 2023
-
Configuration menu - View commit details
-
Copy full SHA for fe74ebd - Browse repository at this point
Copy the full SHA fe74ebdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ffc943 - Browse repository at this point
Copy the full SHA 8ffc943View commit details -
Configuration menu - View commit details
-
Copy full SHA for 17b9c0a - Browse repository at this point
Copy the full SHA 17b9c0aView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.