checkstyle / checkstyle

Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. By default it supports the Google Java Style Guide and Sun Code Conventions, but is highly configurable. It can be invoked with an ANT task and a command line program.
https://checkstyle.org
GNU Lesser General Public License v2.1
8.34k stars 3.67k forks source link

Re-enable and Monitor `YAMLSchemaValidation` inspection #14806

Open MANISH-K-07 opened 6 months ago

MANISH-K-07 commented 6 months ago

Follow-up of https://github.com/checkstyle/checkstyle/pull/14696#pullrequestreview-2006660651

inspection-results/YAMLSchemaValidation.xml We had stable failure of inspection validation YAMLSchemaValidation https://app.circleci.com/pipelines/github/checkstyle/checkstyle/23624/workflows/e04a197a-8172-4262-9fa3-de02579854c4/jobs/506740/artifacts

<problems is_local_tool="true">
<problem>
<file>file://$PROJECT_DIR$/.github/workflows/site.yml</file>
<line>14</line>
<module>project</module>
<entry_point TYPE="file" FQNAME="file://$PROJECT_DIR$/.github/workflows/site.yml"/>
<problem_class id="YAMLSchemaValidation" severity="WARNING" 
      attribute_key="WARNING_ATTRIBUTES">Validation by JSON Schema</problem_class>
<description>Schema validation: Property 'name' is not allowed</description>
<highlighted_element>name: "Site"</highlighted_element>
<language>yaml</language>
<offset>0</offset>
<length>12</length>
</problem>

This problem is a false positive. Facing instability with this inspection, it had been disabled at https://github.com/checkstyle/checkstyle/commit/65314ea6904f8a09482d6d1f673dc4fd715f0c77

We have migrated IDEA to highest true scopes release v2022.3.3 at #14696

Hoping that the migration has fixed this problem (https://github.com/checkstyle/checkstyle/issues/14806#issuecomment-2063439340), we need to try and re-enable this inspection.

https://github.com/checkstyle/checkstyle/blob/0707dd5ac38b2f0fd4af9941070ea2615c17f335/config/intellij-idea-inspections.xml#L4109-L4111

MANISH-K-07 commented 6 months ago

@romani , @nrmancuso , You can track re-runs of inspections for success/failure at https://github.com/checkstyle/checkstyle/pull/14808#issuecomment-2063268642

I will keep restarting CI and updating that comment with links until you are satisfied for merge ;)

MANISH-K-07 commented 6 months ago

Unfortunately, the problem still persists despite migration of IDEA to v2022.3.3 :( https://output.circle-artifacts.com/output/job/4946fcff-c418-4172-b566-5e343cb6d7b7/artifacts/0/home/circleci/project/target/inspection-results/YAMLSchemaValidation.xml

@romani , what do you suggest we do? Report this to jetBrains?

nrmancuso commented 6 months ago

what do you suggest we do? Report this to jetBrains?

Unless you can show that it still happens on the latest version, I am not sure if they will give it much attention.

Due to the flakiness of this issue, I have commented elsewhere previously that it may be a network/server problem rather than an actual "bug" in the inspections engine. The yaml schema is downloaded on each execution of inspections.

MANISH-K-07 commented 6 months ago

Unless you can show that it still happens on the latest version, I am not sure if they will give it much attention.

Honestly, there's been no activity at scopes issue itself despite the fact that it impacts latest releases. Please see IJPL-1068 Me being used to everything getting done so efficiently here at CS, it seems a bit strange that they take so long even after issue is assigned 😅

I have commented elsewhere previously that it may be a network/server problem rather than an actual "bug" in the inspections engine. The yaml schema is downloaded on each execution of inspections.

@nrmancuso , so how long can we keep it disabled then? Is there any alternative?

nrmancuso commented 6 months ago

I personally don't care if this stays disabled forever. We can leave this issue open for as long we we need to and come back some other time when it is convenient; this has no user impact.

romani commented 6 months ago

Unfortunately, the problem still persists despite migration of IDEA to v2022.3.3 :(

Please close PR and let's wait for our migration to latest Idea. This issue is blocked for now