robotframework-robocop

Tool for static code analysis of Robot Framework language

APACHE-2.0 License

Downloads
256K
Stars
182
Committers
20

Bot releases are visible (Hide)

robotframework-robocop - 1.7.1

Published by mnojek over 3 years ago

This is mostly a bugfix release with minor changes to configurables and a big refactor in documentation.

Fixes

  • Fixed typos and outdated parts in documentation, rephrased some parts #338
  • Fixed typos in description of the rules #338
  • Different line endings are now properly supported when using Robocop API #342
  • Fixed issues with line-too-long (W0508) rule: #349
    • Hidden characters do not count towards line length limit #345
    • Tabulators are now properly counted #346
    • Disablers in comment are excluded from line length limit #347

Other

  • Better and more concise display of configurable parameters (now they also have some description and show the default value) #338 #350
  • Removed 'checkers' section in documentation and moved some parts under 'rules' section #338

Acknowledgements

Thanks @d-biehl for resolving issue with line endings!

robotframework-robocop - 1.7.0

Published by bhirsz over 3 years ago

This release is mostly a big refactoring with parts of the code not touched since the very first commits. Some defaults has changed, some documentation has been updated. We made couple of fixes also and deprecated rule W0906 that is now exchanged with two new ones: W0909 and W0910. README is now written in markdown and it has a new expandable FAQ section at the bottom. There is also a new verbose mode and pyproject.toml is now supported for tool configuration. These and many more are described in detail below. Enjoy! 👮🏻‍♂️

New rules

  • W0909 (inconsistent-assignment) checks if all assignments in *** Test Cases *** and *** Keywords *** sections are the same type #295
  • W0910 (inconsistent-assignment-in-variables) checks if all assignments in *** Variables *** section are the same type #295

Note: Possible values for W0909 and W0910 assignment_sign_type parameter are: none (without equal sign), equal_sign ('='), space_and_equal_sign (' ='), autodetect (detects the most common option and looks for inconsistencies in the code).

  • W0705 (bom-encoding-in-file) checks if robot file uses not supported BOM (Byte Order Mark) encoding #327
  • W0911 (wrong-import-order) checks if builtin libraries are imported before any other library #313

Deprecated rules

  • W0906 (redundant-equal-sign) - with the addition of W0909 and W0910 the W0906 is being deprecated. You can get the old W0906 behavior with W0909 and W0910 if you configure their parameter assignment_sign_type with one of: equal_sign ('='), none (''), space_and_equal_sign (' ='). W0906 will be deleted in next bigger release (1.8.0) or in the following (1.9.0) if it will be too early. #321

Fixes

  • W1002 (missing-trailing-blank-line) will not report each time when used with LSP #307
  • Misaligned variables in *** Variables *** section should not cause fatal exception now #292
  • Empty keyword names causing TypeError exception #318
  • W0302 (not-capitalized-keyword-name) should have better support for local characters #314
  • W0704 (ignored-data) now works with BOM encoded files #326
  • Changed outdated data in documentation #335
  • For loops and IFs inside test cases should be parsed by indent rules #331
  • W1007 (uneven-indent) will now ignore comments between test cases and keywords #332
  • Empty test case name will not throw IndexError from now #333

Other

  • README has been rewritten to markdown and now includes nice FAQ section #335
  • Video of our talk from RoboCon2021 is now included at the top of README file! #335
  • pyproject.toml is now supported #301 See documentation for more info docs
  • Severity is not listed in every rule when using --list-configurables, instead it's listed only once #304
  • --list-configurables now displays only rules that have configurable parameter #335
  • Prettified --list-reports output #335
  • severity parameter in other CLI options is now case-insensitive (both e/w/i and E/W/I are accepted) #335
  • Rule name is now included in default issue output #310
  • Added -vv / --verbose flag for more detailed output #72 #335
  • Return status is now calculated on number of found issues that exceed quality gates limits #335
  • Quality gates default values are now {'E': 0, 'W': 0, 'I': -1} which means that any error or warning will make Robocop return non-zero status. -1 value means that issues with INFO severity will not affect return code. This can be configured by --configure return_status:quality_gate:E=<value>:W=<value>:I=<value #335
  • Changed defaults for some lengths checkers: #335
    • testcase_max_calls: 8 → 10 (maximum amount of keyword calls inside test case)
    • keyword_max_calls: 8 → 10 (maximum amount of keyword calls inside keyword)
    • keyword_min_calls: 2 → 1 (minimum amount of keyword calls inside keyword)
  • --ext_rules option is now --ext-rules option (changed underscore _ to hyphen -) #335
  • Some command line options received short flag argument: #335
    • -nr for --no-recursive
    • -lc for --list-configurables
    • -lr for --list-reports
    • -ft for --filetypes
    • -g for --ignore

Acknowledgements

  • Thanks @d-biehl for fixing #333 and #318 - you're true hero!🦸‍♂️
robotframework-robocop - 1.6.1

Published by bhirsz over 3 years ago

Pack of fixes.

Fixes

  • file_stats will acknowledge issues excluded by configuration #299
  • W1007 (uneven-indent) should not report comments as rule volations #296
  • W1007 (uneven-indent) should parse IFs #297
  • Robocop API should load configuration file #302
  • If there is invalid configuration while using Robocop API, it will throw InvalidArgumentError instead of SystemExit #303
robotframework-robocop - 1.6.0

Published by bhirsz over 3 years ago

This release introduce initial support for integration with LSP. It makes possible to integrate Robocop with IDEs like Intellij and should enable us to add Robocop to other tools or plugins.

New rules

  • W1011 (misaligned-continuation) checks if continuation marks ... are aligned with starting row #285

Fixes

  • W1007 (uneven-indent) should now work better with pipe style #284

Other

  • Extended our API for easier integration with other tools #168
robotframework-robocop - 1.5.0

Published by bhirsz over 3 years ago

This release brings few small improvements and fixes critical issues that occur when using Robot Framework 4.0.

New rules

  • E0311 (else-not-upper-case) checks if ELSE and ELSE IF branches in IF block are upper case #278

Fixes

  • W1006 (mixed-tabs-and-spaces) should be able to report more than one rule violation per run #274
  • W1007 (uneven-indent) should now support IF blocks #274
  • E0303 (keyword-name-is-reserved-word) will not throw exception when there is only comment in the line #274

Other

  • New report file_stats can display overall statistics about number of processed files #262
  • You can now use # noqa as alternative to # robocop: disable #269
  • 10% performance improvement thanks to #129
robotframework-robocop - 1.4.1

Published by mnojek over 3 years ago

Fixes

  • W1002 (missing-trailing-blank-line) - Fix rule and add tests to increase coverage (#270)
robotframework-robocop - 1.4.0

Published by mnojek over 3 years ago

This release brings new rules and features that help to uphold the law.
It also prepares Robocop for new Robot Framework 4.0 release which will help fighting with new hordes of evil.

New rules

  • W1010 (too-many-trailing-blank-lines) - Checks if there are too many blank lines at the end of the file #250
  • W0906 (redundant-equal-sign) - Detects redundant equal sign in variable section #265
  • W0308 (not-capitalized-test-case-title) - Checks if test case title starts with capital letter #267
  • W0309 (section-variable-not-uppercase) - Variables in variable section should be uppercase #268
  • W0310 (non-local-variables-should-be-uppercase) - Test, suite and global variables should be uppercased #268
  • I0908 (if-can-be-used) - Suggests that Run Keyword If and Run Keyword Unless can be now changed to new IF statements #259

Fixes

  • W0302 (not-capitalized-keyword-name) now supports numbers inside keyword names #249
  • W0306 (setting-name-not-capitalized) can detect all not capitalized settings for keyword and test case #266

Other

  • Robocop now supports Robot Framework 4.0 #258 #254
  • Robocop can now export results to JSON using new JsonReport #251
  • Command line arguments can now be loaded from .robocop file #253
  • New command line option --list-reports that displays all available reports #263
  • Two rules are disabled when using RF4.0: nested-for-loop and invalid-comment

Acknowledgements

  • Thanks to @andreagubellini for help with exporting rules #251
robotframework-robocop - 1.3.2

Published by bhirsz over 3 years ago

  • fixed W0302 (keyword-not-capitalized) rule being raised on words with apostrophes (for example Item's) #248
robotframework-robocop - 1.3.1

Published by bhirsz almost 4 years ago

  • fixed regression where robot files from different root tree caused exception #247
robotframework-robocop - 1.3.0

Published by bhirsz almost 4 years ago

Another rule joined our justice department! And two small improvements.

  • ignored-data rule - check if there is data before first section #243
  • mixed-tabs-and-spaces is now approx. 8 times faster #236
  • new report scan_timer that prints how much time it took for scan to complete

Acknowledgements

robotframework-robocop - 1.2.1

Published by bhirsz almost 4 years ago

  • Fix embedded variables with underscore in name reported as 'not-capitalized-keyword-name' #240
robotframework-robocop - 1.2.0

Published by bhirsz almost 4 years ago

Release 1.2.0 resolves mostly about improving quality (by introducing acceptance tests for the rules) but it also adds many fixes and one small feature.

New rules

  • W1009 (empty-line-after-section) - check if there are empty lines after section header and before any other line (#198)

Fixes

  • Fix empty-section unnecessary raised for *** Comments *** section (#234)
  • Fix rule for invalid syntax for [Teardown]
  • Fix duplicated name rule for Variables import (it never ran due to typo)
  • Reword too-many-arguments warning text (remove sentence suggesting splitting arguments to new lines) (#224)
  • Fix not-capitalized-keyword-name to ignore special characters (#226)
  • Fix not-capitalized-keyword-name to ignore possible library imports (#214)

Other

  • Robocop now supports printing relative paths in rule message with {source_rel} (#222)
  • Rules are now ordered in the docs (#217 and #228)
  • Added acceptance testing for all rules (#46)

Acknowledgements

robotframework-robocop - Robocop 1.1.0

Published by bhirsz about 4 years ago

Robocop 1.1.0 introduces new rule, moves existing rule to another group and enhances --list feature. Details:

Changes to rules

  • Added "mixed-tabs-and-spaces" rule for verifying if file does not contain both tabs and spaces
  • Renamed "ineven-indent" rule to "uneven-indent". Moved "uneven-indent" and "bad-indent" rules from misc to spacing group.
    This is not backwards compatible change - the rule IDs change from "0904" and "0905" to "1007" and "1008" respectively

Enhanced --list CLI option

  • Added option to pass glob pattern to --list
robocop --list some-rule*
  • Added --list-configurables option to list rules with their configurable parameters

Other

  • Updated examples in external-checkers.rst

Acknowledgements

  • Szabolcs Tóth who created "mixed-tabs-and-spaces" rule and updated our docs
robotframework-robocop - Robocop 1.0.1

Published by bhirsz about 4 years ago

This release fixes the issue with circular imports when using Robocop installed from PyPi.

robotframework-robocop - First release - Robocop 1.0.0

Published by bhirsz about 4 years ago

Initial release of Robocop