-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add QuotingChecker #35
Open
flavono123
wants to merge
3
commits into
shortdudey123:master
Choose a base branch
from
flavono123:feature/lint-quoting-checker
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add QuotingChecker #35
flavono123
wants to merge
3
commits into
shortdudey123:master
from
flavono123:feature/lint-quoting-checker
Conversation
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
- Define the abstract class YamlLint::Linter::RecursiveChecker, check at each value in Psych parsed yaml tree recursivley. - YamlLint::Linter::KeyOverlapDetector inherit from it. Signed-off-by: Hansuk Hong <[email protected]>
Closed
flavono123
force-pushed
the
feature/lint-quoting-checker
branch
2 times, most recently
from
August 17, 2018 11:31
3f71855
to
3fa4fa0
Compare
- Checks the quoted string using proper quotes for escape charaters. - Enforce the single quoted style for strings without escape characters. Signed-off-by: Hansuk Hong <[email protected]>
- Remove the short circuit evaluation between checking overlapping keys and quoting. Signed-off-by: Hansuk Hong <[email protected]>
flavono123
force-pushed
the
feature/lint-quoting-checker
branch
from
August 17, 2018 11:36
3fa4fa0
to
bcd18bb
Compare
@@ -96,7 +96,10 @@ def check_filename(filename) | |||
def check_data(yaml_data, errors_array) | |||
valid = check_not_empty?(yaml_data, errors_array) | |||
valid &&= check_syntax_valid?(yaml_data, errors_array) | |||
valid &&= check_overlapping_keys?(yaml_data, errors_array) | |||
valid &&= [ |
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.
Why not just add a new line with the new method call and not put an array here?
end | ||
end | ||
|
||
def include_esacpe_characters?(node) |
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.
Can you fix the spelling of escape?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
YamlLint::Linter::QuotingChecker
Refactor
Signed-off-by: Hansuk Hong [email protected]