Skip to content

Commit 6c0b334

Browse files
committed
Update CHANGELOG.md and other documentation
1 parent 02ade43 commit 6c0b334

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# Change Log
66

77
## 0.9.10
8+
- Added indentation style rules to the lint module
89

910
## 0.9.9
1011
- Fixed an issue that could cause analysis thread crash when an object was declared both

example_files/example_lint_cfg.README

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,12 @@
1717
// "nsp_unary": {}
1818
// or assign it to null
1919
"nsp_unary": null
20+
// indentation rules can be configured by setting
21+
// "indentation_spaces" field for "indent_size" rule
22+
// to the desired integer value (defaults to 4).
23+
// all other indentation rules will use this size
24+
"indent_size": { "indentation_spaces": 4 },
25+
"indent_tabs": {},
26+
"indent_code_block": {}
27+
2028
}

src/lint/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ This depth increases depending on each node type. A function `should_increment_d
4141
Each rule should be configurable to be either enabled/disabled, or have any extra parameters (like line length threshold for example) as required.
4242

4343
The client extension should specify a declarative file with this configuration. This file is used to define `LintCfg` struct which is passed down to each linter job. The linter job can then setup the rule settings accordingly.
44-
See [example_lint_cfg.json](./example_files/example_lint_cfg.json) and its corresponding README for details on how to use this file.
44+
See [example_lint_cfg.json](../../example_files/example_lint_cfg.json) and its corresponding README for details on how to use this file.
4545
Users can decide to define the config file in order to turn off any rules or set parameters avaiable for customizing their behavior.
4646
Currently, the lint module will be enabled by default on the DLS. The `simics-modeling.dls.lintingEnabled` setting in the workspace configuration can be set to disable the style checks.
4747

src/lint/features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Below are listed the currently supported rules for linting:
1111
- NspTrailing, `nsp_trailing`: no spaces between the last token in a line and the corresponding newline `\n`
1212

1313
## Indentation
14-
- **IN1**, `indent_size`: Lines are indented a fixed amount of spaces for each indentation level. Defaults to 4, can be set to a custom value
14+
- **IN1**, `indent_size`: Lines are indented a fixed amount of spaces for each indentation level. Defaults to 4, can be set to a custom value by defining field "indentation_spaces" lint configuration [json file](../../example_files/example_lint_cfg.README)
1515
- **IN2**, `indent_no_tabs`: Tab characters (ASCII 9) should never be used to indent lines
1616
- **IN3**, `indent_code_block`: If the previous line contains an opening brace without corresponding closing brace, the current line should be indented one level more than the previous line
1717
- **IN4**, `indent_closing_brace`: Closing braces at the beginning of a line should be aligned to the corresponding indentation level of the statement that started the code block. A closing brace should only ever appear on the same line as the opening brace, or first on a line

0 commit comments

Comments
 (0)