Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscerie committed Oct 15, 2023
1 parent 5f3a84b commit 26c3c76
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Added `no-exclude` cli flag to disable excludes.
- When given in standard library format, additional information now shows up in `incorrect_standard_library_use` missing required parameter errors.
- Added new [`mixed_table` lint](https://kampfkarren.github.io/selene/lints/mixed_table.html), which will warn against mixed tables.
- Added new [`fix`](https://kampfkarren.github.io/selene/cli/usage.html#fix) flag, which will automatically apply lint suggestions.

### Fixed
- `string.pack` and `string.unpack` now have proper function signatures in the Lua 5.3 standard library.
Expand Down
4 changes: 4 additions & 0 deletions docs/src/cli/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ Results:
0 parse errors
```

**--fix** *fix*

Automatically applies lint suggestions. Because this can be potentially destructive, it's not allowed by default when there are uncommitted changes. This safety can be ignored by including `--allow-dirty` to allow with unstaged changes or `--allow-staged` to allow only staged changes.

**--num-threads** *num-threads*

Specifies the number of threads for selene to use. Defaults to however many cores your CPU has. If you type `selene --help`, you can see this number because it will show as the default for you.
Expand Down
2 changes: 1 addition & 1 deletion selene-lib/src/lints/unused_variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ impl Lint for UnusedVariableLint {

// Applying fix would cause existing references to reference a nonexistent variable. It's possible to
// also rename those references as well, but we'd need to check each of their scopes for potentially
// colliding variables. Cargo just doesn't apply a fix at all in these cases.
// colliding variables. Clippy just doesn't apply a fix at all in these cases.
if variable.references.iter().any(|reference| {
ast_context.scope_manager.references[*reference]
.identifier
Expand Down

0 comments on commit 26c3c76

Please sign in to comment.