-
Notifications
You must be signed in to change notification settings - Fork 10
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
Added ignore/whitelist patterns for yamllint. #28
Conversation
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. | |||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | |||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | |||
|
|||
## 2.19 | |||
### Added | |||
- Option to add/edit whitelist or ignore patterns to yamllint. |
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.
I thought this was already possible with e.g this in your grumphp file
grumphp:
tasks:
yamllint:
whitelist_patterns:
- ^bamboo-specs\/(.*)
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.
@rutgerrademaker But do you want to have this exclude in every project setup?
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.
yes the same as composer.strict:false :(
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.
Only when bamboo yaml does not validate
In my case it failed on multi-docs (---) and includes (!)
Ideally I could just ignore those, but did not find a solution for that yet
CHANGELOG.md
Outdated
## 2.19 | ||
### Added | ||
- Option to add/edit whitelist or ignore patterns to yamllint. | ||
- Skip Bamboo files by default, since they don't comply with yaml. |
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.
I don't think it is testing-suites responsibility to add these kind of specific excludes
Wonder what others are thinking
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.
I agree, unless it becomes quite unpractical to manage in some other way. I checked this shortly with Leon. Any ideas?
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.
I am a bit two-fold on this. If we know that a particular file format is always not going to adhere to the correct standard (which is the case for Bamboo spec files) I rather have it in the testing suite then as a configuration in every individual project.
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.
Yes, that was my view on it as well. But testing suite is an open repository used by other parties as well, which makes it a bit nasty imo.
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.
I did not take that in consideration on my first approval but I did after the comment of Rutger.
We know that Bamboo spec files due to the merging functionality are not true YAML files, so from that perspective excluding it seems like the right way to go. For projects already setting a exclude list this is still used over the custom implementation added here.
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.
Do we then want to keep open this PR, reading the other comment from Rutger this is already possible by default or am I misunderstanding?
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.
This is not how the youwe testing suite uses this, because you can add options but you cannot edit. Especially when you use import function. So please do not use this option.
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.
In theory the merged files should also be valid yaml I guess
Al the "templates" we use to create the bamboo spec file are valid yaml on their own
Its just that includes and multidocs won't validate
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.
I was referring to this comment:
#28 (comment)
Did we check if this is indeed possible? If so I am missing a bit what the revised PR does
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.
Discussed with Leon, and aligned that this is to comply with the general structure of creating overridable configuration values.
No description provided.