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

Report warnings as errors by default #636

Merged
merged 5 commits into from
Oct 5, 2023

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Oct 5, 2023

What does this PR do?

Warnings that could be optionally enabled as errors are reported as errors now, and can be filtered-out. Starting on Package Spec v3.

Why is it important?

To raise awareness on the issues reported by these warnings, so they are not so easily ignored, but can still be discarded.

Checklist

Related issues

@jsoriano jsoriano self-assigned this Oct 5, 2023
@jsoriano jsoriano requested a review from a team as a code owner October 5, 2023 08:57
@jsoriano jsoriano mentioned this pull request Oct 5, 2023
Copy link
Contributor

@mrodm mrodm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea to change these warnings to be errors that could be filtered.

But it will also require to add in most of the packages defined in the integrations repository the validation.yml file including these new codes. And probably (endpoint, apm...). I guess this is affordable.

@jsoriano jsoriano changed the title Warnings are reported as errors Report warnings as errors by default Oct 5, 2023
@jsoriano
Copy link
Member Author

jsoriano commented Oct 5, 2023

/test

@elasticmachine
Copy link

💚 Build Succeeded

History

cc @jsoriano

Comment on lines +148 to +149
{fn: semantic.WarnOn(semantic.ValidateMinimumKibanaVersion), until: semver.MustParse("3.0.0")},
{fn: semantic.ValidateMinimumKibanaVersion, since: semver.MustParse("3.0.0")},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! So until 3.0.0 is the same behaviour, that's perfect!
I didn't remember that until parameter 👍

@@ -9,10 +9,13 @@ const (
UnassignedCode = ""

// PSR - Package Spec [General] Rule
CodeNonGASpecOnGAPackage = "PSR00001"
CodeNonGASpecOnGAPackage = "PSR00001"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say this code can be removed, it looks like is not used right now

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used in

specerrors.CodeNonGASpecOnGAPackage)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah it's from other file out of this PR , sorry. I thought it was a new error code 👍

@@ -9,10 +9,13 @@ const (
UnassignedCode = ""

// PSR - Package Spec [General] Rule
CodeNonGASpecOnGAPackage = "PSR00001"
CodeNonGASpecOnGAPackage = "PSR00001"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah it's from other file out of this PR , sorry. I thought it was a new error code 👍

@jsoriano jsoriano merged commit 5e9e9c0 into elastic:main Oct 5, 2023
@jsoriano jsoriano deleted the warning-as-errors branch October 5, 2023 18:19
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.

3 participants