-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] refactoring autoconverted ruby code into ruby code #40
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
37c8b03
refactoring autoconverted ruby code into ruby code
vpereira 8aa8cf5
added rubocop_yast_style.yml
vpereira a5ce056
added changes to package/yast2-security.changes
vpereira e7a1a07
fixed some changes proposed by jreidinger
vpereira 7aed7c3
fixed rubocop issues
vpereira d9e8a4f
fixed all rubocops offenses
vpereira 8b37930
fixed suggestion from jreidinger
vpereira File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
require "yast/rake" | ||
|
||
Yast::Tasks.configuration do |conf| | ||
#lets ignore license check for now | ||
# lets ignore license check for now | ||
conf.skip_license_check << /.*/ | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
# Rubocop style configuration | ||
# | ||
# Following | ||
# https://github.com/SUSE/style-guides/blob/master/Ruby.md | ||
|
||
# https://github.com/SUSE/style-guides/blob/master/Ruby.md#strings | ||
inherit_from: | ||
/usr/share/YaST2/data/devtools/data/rubocop_yast_style.yml | ||
|
||
Style/IfInsideElse: | ||
Enabled: false | ||
|
||
Style/MultilineTernaryOperator: | ||
Enabled: false | ||
|
||
Lint/UnderscorePrefixedVariableName: | ||
Enabled: false | ||
|
||
|
||
Metrics/AbcSize: | ||
Max: 129 | ||
Exclude: | ||
- 'src/lib/**/*.rb' # be more strict for new code in lib | ||
|
||
Metrics/AbcSize: | ||
Max: 30 | ||
Include: | ||
- 'src/lib/**/*.rb' # be more strict for new code in lib | ||
|
||
Metrics/BlockNesting: | ||
Max: 5 | ||
Exclude: | ||
- 'src/lib/**/*.rb' # be more strict for new code in lib | ||
|
||
Metrics/BlockNesting: | ||
Max: 2 | ||
Include: | ||
- 'src/lib/**/*.rb' # be more strict for new code in lib | ||
|
||
|
||
# Configuration parameters: CountComments. | ||
Metrics/ClassLength: | ||
Max: 385 | ||
Exclude: | ||
- 'src/lib/**/*.rb' # be more strict for new code in lib | ||
|
||
# Configuration parameters: CountComments. | ||
Metrics/ClassLength: | ||
Max: 200 | ||
Include: | ||
- 'src/lib/**/*.rb' # be more strict for new code in lib | ||
|
||
Metrics/ModuleLength: | ||
Max: 385 | ||
Exclude: | ||
- 'src/lib/**/*.rb' # be more strict for new code in lib | ||
|
||
Metrics/ModuleLength: | ||
Max: 100 | ||
Include: | ||
- 'src/lib/**/*.rb' # be more strict for new code in lib | ||
|
||
Metrics/CyclomaticComplexity: | ||
Max: 29 | ||
Exclude: | ||
- 'src/lib/**/*.rb' # be more strict for new code in lib | ||
|
||
Metrics/CyclomaticComplexity: | ||
Max: 10 | ||
Include: | ||
- 'src/lib/**/*.rb' # be more strict for new code in lib | ||
|
||
# Configuration parameters: AllowURI, URISchemes. | ||
Metrics/LineLength: | ||
Max: 299 | ||
Exclude: | ||
- 'src/lib/**/*.rb' # be more strict for new code in lib | ||
|
||
# Configuration parameters: AllowURI, URISchemes. | ||
Metrics/LineLength: | ||
Max: 100 # TODO this should be lower for new code | ||
Include: | ||
- 'src/lib/**/*.rb' # be more strict for new code in lib | ||
|
||
# Configuration parameters: CountComments. | ||
Metrics/MethodLength: | ||
Max: 160 | ||
Exclude: | ||
- 'src/lib/**/*.rb' # be more strict for new code in lib | ||
|
||
# Configuration parameters: CountComments. | ||
Metrics/MethodLength: | ||
Max: 30 # TODO this should be lower for new code | ||
Include: | ||
- 'src/lib/**/*.rb' # be more strict for new code in lib | ||
|
||
Metrics/PerceivedComplexity: | ||
Max: 34 | ||
Exclude: | ||
- 'src/lib/**/*.rb' # be more strict for new code in lib | ||
|
||
Metrics/PerceivedComplexity: | ||
Max: 10 | ||
Include: | ||
- 'src/lib/**/*.rb' # be more strict for new code in lib | ||
|
||
# be more strict then rubocop, 5 is too much | ||
Metrics/ParameterLists: | ||
Max: 4 | ||
|
||
# Configuration parameters: EnforcedStyle, SupportedStyles. | ||
Style/AndOr: | ||
EnforcedStyle: conditionals | ||
|
||
Style/Documentation: | ||
Include: | ||
- 'src/lib/**/*.rb' # force well documented code only for new code | ||
|
||
Style/FileName: | ||
Include: | ||
- 'src/lib/**/*.rb' # force correct names on new code | ||
|
||
Style/HashSyntax: | ||
Include: | ||
- 'src/lib/**/*.rb' # force new hash style only for new code | ||
|
||
# JR: I found lambda easier to read and understand then ->() | ||
Style/Lambda: | ||
Enabled: false | ||
|
||
Style/MethodName: | ||
Include: | ||
- 'src/lib/**/*.rb' # force correct names on new code | ||
|
||
Style/VariableName: | ||
Include: | ||
- 'src/lib/**/*.rb' # force known variables only for new code | ||
|
||
# alias method is more convenient method for method aliasing | ||
Style/Alias: | ||
EnforcedStyle: prefer_alias_method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it valid? what is reason for this change?