You've already forked osfv-scripts
mirror of
https://github.com/Dasharo/osfv-scripts.git
synced 2026-03-06 14:55:02 -08:00
pre-commit: add robocop and robotidy
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
This commit is contained in:
@@ -59,3 +59,13 @@ repos:
|
||||
rev: 24.4.2
|
||||
hooks:
|
||||
- id: black
|
||||
|
||||
- repo: https://github.com/MarketSquare/robotframework-tidy
|
||||
rev: 4.8.1
|
||||
hooks:
|
||||
- id: robotidy
|
||||
|
||||
- repo: https://github.com/MarketSquare/robotframework-robocop
|
||||
rev: 5.0.1
|
||||
hooks:
|
||||
- id: robocop
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
spacecount = 4
|
||||
indent = 4
|
||||
continuation-indent = 4
|
||||
line-length = 120
|
||||
lineseparator = "unix"
|
||||
separator = "space"
|
||||
|
||||
transform = [
|
||||
"AddMissingEnd",
|
||||
"AlignSettingsSection",
|
||||
"AlignVariablesSection",
|
||||
"DiscardEmptySections",
|
||||
"InlineIf",
|
||||
"MergeAndOrderSections",
|
||||
"NormalizeAssignments",
|
||||
"NormalizeComments",
|
||||
"NormalizeNewLines",
|
||||
"NormalizeSectionHeaderName",
|
||||
"NormalizeSeparators",
|
||||
"NormalizeSettingName",
|
||||
"OrderSettings",
|
||||
"OrderSettingsSection",
|
||||
"RemoveEmptySettings",
|
||||
"RenameKeywords",
|
||||
"RenameTestCases",
|
||||
"RenameVariables",
|
||||
"ReplaceBreakContinue",
|
||||
"ReplaceEmptyValues",
|
||||
"ReplaceReturns",
|
||||
"ReplaceRunKeywordIf",
|
||||
"SplitTooLongLine",
|
||||
]
|
||||
|
||||
# Consider enabling:
|
||||
# "SmartSortKeywords",
|
||||
|
||||
|
||||
configure = [
|
||||
"NormalizeAssignments:equal_sign_type=equal_sign",
|
||||
"NormalizeAssignments:equal_sign_type_variables=equal_sign",
|
||||
"OrderSettingsSection:group_order=documentation,imports,settings,tags",
|
||||
"OrderSettingsSection:documentation_order=documentation,metadata",
|
||||
"OrderSettingsSection:imports_order=library,resource,variables",
|
||||
"OrderSettingsSection:settings_order=suite_setup,suite_teardown,test_setup,test_teardown,test_timeout,test_template",
|
||||
"RenameKeywords:ignore_library=False",
|
||||
"RenameVariables:settings_section_case=upper",
|
||||
"RenameVariables:variables_section_case=upper",
|
||||
"RenameVariables:variables_section_case=upper",
|
||||
"RenameVariables:variable_separator=underscore",
|
||||
"SplitTooLongLine:split_single_value=True",
|
||||
"SplitTooLongLine:align_new_line=True",
|
||||
]
|
||||
@@ -0,0 +1,42 @@
|
||||
[tool.robocop]
|
||||
configure = [
|
||||
# TODO: add missing documentation for keywords and re-enable
|
||||
"0201:enabled:False",
|
||||
# TODO: add missing documentation for test cases and re-enable
|
||||
"0202:enabled:False",
|
||||
# TODO: add missing documentation for test suitdes and re-enable
|
||||
"0203:enabled:False",
|
||||
# TODO: consider re-enabling
|
||||
"0301:enabled:False",
|
||||
# TODO: consider fixing and re-enabling
|
||||
"0316:enabled:False",
|
||||
# TODO: fix and re-enable
|
||||
"0319:enabled:False",
|
||||
# TODO: fix and re-enable
|
||||
"0327:enabled:False",
|
||||
# TODO: fix and re-enable
|
||||
"0328:enabled:False",
|
||||
# TODO: consider reducing to default 40, or less
|
||||
"0501:max_len:50",
|
||||
# TODO: consider reducing to default 10, or less
|
||||
"0503:max_calls:50",
|
||||
# TODO: consider reducing to dfeault 20, or less
|
||||
"0504:max_len:50",
|
||||
# TODO: consider reducing to dfeault 10, or less
|
||||
"0505:max_calls:50",
|
||||
# TODO: reduce to default 400 or so
|
||||
"0506:max_lines:5000",
|
||||
# TODO: reduce to 120/80
|
||||
"0508:line_length:180",
|
||||
"0701:enabled:False",
|
||||
# TODO: fix and re-enable
|
||||
"0908:enabled:False",
|
||||
# TODO: re-enable after fixes
|
||||
"0913:enabled:False",
|
||||
# TODO: fix unused variables and re-enable
|
||||
"0920:enabled:False",
|
||||
# TODO: consider fixing and re-enabling
|
||||
"0922:enabled:False",
|
||||
# TODO: fix and re-enable
|
||||
"0924:enabled:False"
|
||||
]
|
||||
Reference in New Issue
Block a user