summary refs log tree commit diff stats
path: root/compiler/linter.nim
Commit message (Collapse)AuthorAgeFilesLines
* use strictdefs for compiler (#22365)ringabout2023-08-061-0/+2
| | | | | | | | | | | | | | | * wip; use strictdefs for compiler * checkpoint * complete the chores * more fixes * first phase cleanup * Update compiler/bitsets.nim * cleanup
* Fix some `styleCheck` bugs (#20095)quantimnot2023-05-061-5/+9
| | | | | | | | | | | refs #19822 Fixes these bugs: * Style check violations in generics defined in foreign packages are raised. * Builtin pragma usage style check violations in foreign packages are raised. * User pragma definition style check violations are not raised. Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* fixes #20397; fixes stylecheck regression (#20398)ringabout2022-09-211-0/+1
| | | | | * fixes #20397; fixes stylecheck * add testcase
* Change `styleCheck` to ignore foreign packages (#19822)quantimnot2022-07-141-29/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change `styleCheck` to ignore foreign packages * Symbols from foreign packages are now ignored. * Fixed `styleCheck` violations in `compiler` package. * Added symbol ownership to custom annotation pragmas. * Minor refactors to cleanup style check callsites. * Minor internal documentation of reasons why a symbol isn't checked. Style violations were fixed in the compiler after thet were exposed by the changes. The compiler wouldn't compile otherwise. Symbol ownership for custom pragma annotations is needed for checking the annotation's style. A NPE was raised otherwise. Fixes #10201 See also nim-lang/RFCs#456 * Fix a misunderstanding about excluding field style checks I had refactored the callsites of `styleCheckUse` to apply the DRY principle, but I misunderstood the field access handling in a template as a general case. This corrects it. * Fix some `styleCheck` violations in `compiler/evalffi` The violations were exposed in CI when the compiler was built with libffi. * Removed some uneeded transitionary code * Add changelog entry Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* add astmsgs; add `declared in` msg for usage lint errors (#17961)Timothee Cour2021-05-081-3/+4
| | | | | | | | | * add astmsgs; add `declared in` msg for usage lint errors * fix test * fix tests/tools/tlinter.nim * std prefix
* fixes #15848 [backport:1.2] (#17959)Andreas Rumpf2021-05-071-1/+1
|
* iterable[T] (#17196)Timothee Cour2021-04-111-1/+1
| | | | | | | | * fix failing test toSeq in manual which now works * changelog * reject proc fn(a: iterable) * add iterable to spec * remove MCS/UFCS limitation that now works
* nnkArglist => nnkArgList + special case stylecheck:error (#17529)Timothee Cour2021-03-271-3/+5
| | | | | * nnkArglist => nnkArgList * special case stylecheck:error
* fixes #17060 (#17083)Andreas Rumpf2021-02-181-1/+3
|
* Use modern enums in compiler (#15775)cooldome2020-11-021-1/+1
|
* Big compiler Cleanup (#14777)Clyybber2020-08-281-12/+4
|
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-3/+2
| | | | | | | | | | | | | | | | | | * Cleanup compiler code base * Unify add calls * Unify len invocations * Unify range operators * Fix oversight * Remove {.procvar.} pragma * initCandidate -> newCandidate where reasonable * Unify safeLen calls
* introduce csize_t instead of fixing csize (#12497)Arne Döring2019-10-311-1/+1
|
* [refactoring] remove unused imports in the compiler and in some stdlib modulesAraq2019-07-181-4/+2
|
* makes --styleCheck:error the default for the Nim compiler itselfAraq2019-07-141-5/+14
|
* minor style changesAraq2019-07-101-1/+1
|
* styleCheck: make the compiler and large parts of the stdlib compatible with ↵Araq2019-07-101-7/+1
| | | | --styleCheck:error
* linter: refactoringsAraq2019-07-101-53/+4
|
* nim styleChecker: implemented all the missing features (bugfix)Araq2019-07-101-43/+53
|
* Nim style checker: document the switch; fixes #9564Araq2018-10-301-11/+15
|
* compiler refactoring; use typesafe path handing; docgen: render symbols ↵Andreas Rumpf2018-09-071-3/+3
| | | | between modules
* implements a --nep1:on switch to make the compiler enforce the naming ↵Andreas Rumpf2018-06-131-0/+176
conventions outlined in NEP-1
#0x7C U+007C # VERTICAL LINE #0x7D U+007D # RIGHT CURLY BRACKET #0x7E U+007E # TILDE 0xA0 U+00A0 # NO-BREAK SPACE 0xA1 U+0401 # CYRILLIC CAPITAL LETTER IO 0xA2 U+0402 # CYRILLIC CAPITAL LETTER DJE 0xA3 U+0403 # CYRILLIC CAPITAL LETTER GJE 0xA4 U+0404 # CYRILLIC CAPITAL LETTER UKRAINIAN IE 0xA5 U+0405 # CYRILLIC CAPITAL LETTER DZE 0xA6 U+0406 # CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I 0xA7 U+0407 # CYRILLIC CAPITAL LETTER YI 0xA8 U+0408 # CYRILLIC CAPITAL LETTER JE 0xA9 U+0409 # CYRILLIC CAPITAL LETTER LJE 0xAA U+040A # CYRILLIC CAPITAL LETTER NJE 0xAB U+040B # CYRILLIC CAPITAL LETTER TSHE 0xAC U+040C # CYRILLIC CAPITAL LETTER KJE 0xAD U+00AD # SOFT HYPHEN 0xAE U+040E # CYRILLIC CAPITAL LETTER SHORT U 0xAF U+040F # CYRILLIC CAPITAL LETTER DZHE 0xB0 U+0410 # CYRILLIC CAPITAL LETTER A 0xB1 U+0411 # CYRILLIC CAPITAL LETTER BE 0xB2 U+0412 # CYRILLIC CAPITAL LETTER VE 0xB3 U+0413 # CYRILLIC CAPITAL LETTER GHE 0xB4 U+0414 # CYRILLIC CAPITAL LETTER DE 0xB5 U+0415 # CYRILLIC CAPITAL LETTER IE 0xB6 U+0416 # CYRILLIC CAPITAL LETTER ZHE 0xB7 U+0417 # CYRILLIC CAPITAL LETTER ZE 0xB8 U+0418 # CYRILLIC CAPITAL LETTER I 0xB9 U+0419 # CYRILLIC CAPITAL LETTER SHORT I 0xBA U+041A # CYRILLIC CAPITAL LETTER KA 0xBB U+041B # CYRILLIC CAPITAL LETTER EL 0xBC U+041C # CYRILLIC CAPITAL LETTER EM 0xBD U+041D # CYRILLIC CAPITAL LETTER EN 0xBE U+041E # CYRILLIC CAPITAL LETTER O 0xBF U+041F # CYRILLIC CAPITAL LETTER PE 0xC0 U+0420 # CYRILLIC CAPITAL LETTER ER 0xC1 U+0421 # CYRILLIC CAPITAL LETTER ES 0xC2 U+0422 # CYRILLIC CAPITAL LETTER TE 0xC3 U+0423 # CYRILLIC CAPITAL LETTER U 0xC4 U+0424 # CYRILLIC CAPITAL LETTER EF 0xC5 U+0425 # CYRILLIC CAPITAL LETTER HA 0xC6 U+0426 # CYRILLIC CAPITAL LETTER TSE 0xC7 U+0427 # CYRILLIC CAPITAL LETTER CHE 0xC8 U+0428 # CYRILLIC CAPITAL LETTER SHA 0xC9 U+0429 # CYRILLIC CAPITAL LETTER SHCHA 0xCA U+042A # CYRILLIC CAPITAL LETTER HARD SIGN 0xCB U+042B # CYRILLIC CAPITAL LETTER YERU 0xCC U+042C # CYRILLIC CAPITAL LETTER SOFT SIGN 0xCD U+042D # CYRILLIC CAPITAL LETTER E 0xCE U+042E # CYRILLIC CAPITAL LETTER YU 0xCF U+042F # CYRILLIC CAPITAL LETTER YA 0xD0 U+0430 # CYRILLIC SMALL LETTER A 0xD1 U+0431 # CYRILLIC SMALL LETTER BE 0xD2 U+0432 # CYRILLIC SMALL LETTER VE 0xD3 U+0433 # CYRILLIC SMALL LETTER GHE 0xD4 U+0434 # CYRILLIC SMALL LETTER DE 0xD5 U+0435 # CYRILLIC SMALL LETTER IE 0xD6 U+0436 # CYRILLIC SMALL LETTER ZHE 0xD7 U+0437 # CYRILLIC SMALL LETTER ZE 0xD8 U+0438 # CYRILLIC SMALL LETTER I 0xD9 U+0439 # CYRILLIC SMALL LETTER SHORT I 0xDA U+043A # CYRILLIC SMALL LETTER KA 0xDB U+043B # CYRILLIC SMALL LETTER EL 0xDC U+043C # CYRILLIC SMALL LETTER EM 0xDD U+043D # CYRILLIC SMALL LETTER EN 0xDE U+043E # CYRILLIC SMALL LETTER O 0xDF U+043F # CYRILLIC SMALL LETTER PE 0xE0 U+0440 # CYRILLIC SMALL LETTER ER 0xE1 U+0441 # CYRILLIC SMALL LETTER ES 0xE2 U+0442 # CYRILLIC SMALL LETTER TE 0xE3 U+0443 # CYRILLIC SMALL LETTER U 0xE4 U+0444 # CYRILLIC SMALL LETTER EF 0xE5 U+0445 # CYRILLIC SMALL LETTER HA 0xE6 U+0446 # CYRILLIC SMALL LETTER TSE 0xE7 U+0447 # CYRILLIC SMALL LETTER CHE 0xE8 U+0448 # CYRILLIC SMALL LETTER SHA 0xE9 U+0449 # CYRILLIC SMALL LETTER SHCHA 0xEA U+044A # CYRILLIC SMALL LETTER HARD SIGN 0xEB U+044B # CYRILLIC SMALL LETTER YERU 0xEC U+044C # CYRILLIC SMALL LETTER SOFT SIGN 0xED U+044D # CYRILLIC SMALL LETTER E 0xEE U+044E # CYRILLIC SMALL LETTER YU 0xEF U+044F # CYRILLIC SMALL LETTER YA 0xF0 U+2116 # NUMERO SIGN 0xF1 U+0451 # CYRILLIC SMALL LETTER IO 0xF2 U+0452 # CYRILLIC SMALL LETTER DJE 0xF3 U+0453 # CYRILLIC SMALL LETTER GJE 0xF4 U+0454 # CYRILLIC SMALL LETTER UKRAINIAN IE 0xF5 U+0455 # CYRILLIC SMALL LETTER DZE 0xF6 U+0456 # CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I 0xF7 U+0457 # CYRILLIC SMALL LETTER YI 0xF8 U+0458 # CYRILLIC SMALL LETTER JE 0xF9 U+0459 # CYRILLIC SMALL LETTER LJE 0xFA U+045A # CYRILLIC SMALL LETTER NJE 0xFB U+045B # CYRILLIC SMALL LETTER TSHE 0xFC U+045C # CYRILLIC SMALL LETTER KJE 0xFD U+00A7 # SECTION SIGN 0xFE U+045E # CYRILLIC SMALL LETTER SHORT U 0xFF U+045F # CYRILLIC SMALL LETTER DZHE