package page→ /norms/code/code-refactoring.md
pages/norms/code/code-refactoring.md
30 lines, 1.2 KB. As a page.
- ---
- type: Page
- title: 'Settings: Code: smells after Fowler'
- functionLines: 60
- fileLines: 600
- classLines: 300
- minLines: 8
- maxParams: 5
- maxNesting: 4
- envyMin: 8
- distinctMin: 4
- exclude: []
- ---
- # Settings: Code: smells after Fowler
- Thresholds of the checks of the `code-refactoring` package. Change a number in the header and the checks will take it on the next run. If a key is absent, the default value is used.
- | Key | Default | What it means |
- |---|---|---|
- | `functionLines` | 60 | length of a function in lines of code (RF-R01) |
- | `fileLines` | 600 | length of a file in lines of code (RF-R02) |
- | `classLines` | 300 | length of a class or impl block in lines of code (RF-R02) |
- | `minLines` | 8 | length of a repeated block in significant lines (RF-R03) |
- | `maxParams` | 5 | number of a function's parameters (RF-R04) |
- | `maxNesting` | 4 | nesting depth of blocks (RF-R05) |
- | `envyMin` | 8 | accesses to a foreign object that make a method count as envious (RF-R06) |
- | `distinctMin` | 4 | distinct fields of a foreign object (RF-R06) |
- `exclude` is path masks from the project root that this package's checks do not read: `src/generated/**`, `legacy`, `**/*_pb.ts`. Shared exclusions for all code packages are on the page [/norms/code.md](/norms/code.md).