Skip to content
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

Merged
merged 3 commits into from
Aug 13, 2024

Conversation

leonhelmus
Copy link
Collaborator

No description provided.

@@ -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.
Copy link
Contributor

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\/(.*)

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?

Copy link
Collaborator Author

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 :(

Copy link
Contributor

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.
Copy link
Contributor

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

Copy link
Member

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?

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.

Copy link
Member

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.

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.

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?

Copy link
Collaborator Author

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.

Copy link
Contributor

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

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

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.

@leonhelmus leonhelmus merged commit dda4678 into master Aug 13, 2024
0 of 3 checks passed
@leonhelmus leonhelmus deleted the feature/ignore-patterns-yamllint branch August 13, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants