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

#3035: Add yamllint GHA #3124

Merged
merged 8 commits into from Apr 22, 2024
Merged

#3035: Add yamllint GHA #3124

merged 8 commits into from Apr 22, 2024

Conversation

slry
Copy link
Contributor

@slry slry commented Apr 20, 2024

@yegor256 take a look, please
Closes #3035


PR-Codex overview

This PR updates YAML files and code in the project. It includes changes related to error emails, test resources, and code samples.

Detailed summary

  • Updated email addresses in error files
  • Added test resources for code samples
  • Modified YAML files for parser and maven plugins
  • Adjusted locators and sheets in test resources

The following files were skipped due to too many changes: eo-parser/src/test/resources/org/eolang/parser/packs/syntax/vertical-methods-in-application.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/space-in-tail.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-abstract-decoratee.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-incorrect-version.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/explicit-data.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/syntax/anonymous.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/long-character.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/sodgs/abstracts.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/space-in-naming.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/unphi/with-data.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/adds-default-package.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-not-one-home-meta.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/not-empty-atoms.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/one-space-indent.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/redundant-parentheses/extra-braces-5.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/suffix-with-dots.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-duplicate-names.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-name-duplicates.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/syntax/tuples.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/comment-in-method.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/xi-inside-locator.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-empty-package-meta.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-incorrect-architect.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-mandatory-home-meta.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/vertical-method-in-horizontal-application.yaml, eo-parser/src/test/resources/org/eolang/parser/samples/times.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/invalid-int-literal.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/root-inside-locator.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-signed-binding-index.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/too-far-right-indent.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/sodgs/arrays.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/add-versioned-probes.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-self-naming-with-method-and-this.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/empty-line-before-ref.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/redundant-parentheses/just-number.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/add-probes.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-not-one-package-meta.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-not-one-version-meta.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-unit-test-without-phi.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-comment-format-without-tests.yaml, eo-runtime/src/test/resources/org/eolang/snippets/fibo.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-mandatory-package-meta.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-mandatory-version-meta.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/empty-line-before-method.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/redundant-parentheses/extra-braces-4.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/sodgs/copy-of-argument.yaml, eo-parser/src/test/resources/org/eolang/parser/samples/just-float.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/packs/pre/tuple-to-java.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/scopes-double-scope.yaml, eo-parser/src/test/resources/org/eolang/parser/samples/empty-string.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/double-root-inside-locator.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/priority/space-between.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/syntax/post-method.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/empty-line-before-ref-deep.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/packs/pre/bindings-to-java.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/packs/pre/data-as-bytes.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/method.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-external-weak-typed-atoms.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/redundant-parentheses/extra-braces-6.yaml, eo-parser/src/test/resources/org/eolang/parser/samples/inner-formation.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/empty-line-before-application.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/reversed-as-separate-argument.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/packs/pre/underscore-to-java.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/print/samples/times.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/sodg-packs/bind-rho-and-sigma.yaml, eo-parser/src/test/resources/org/eolang/parser/samples/multiline-string.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/empty-line-before-first-object.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/packs/pre/test-object-to-java.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/version-with-inline-application.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/adds-refs.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-unused-aliases.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/empty-line-in-vertical-application.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/redundant-parentheses/negative-numbers.yaml, eo-runtime/src/test/resources/org/eolang/snippets/ifthenelse.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/packs/pre/locators-to-java.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/print/samples/just-float.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/redundant-parentheses/extra-braces-3.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/print/samples/empty-string.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/one-byte.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/float-up-same-attrs.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/print/samples/multiline-string.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/packs/pre/embedded-class.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-noname-attrs.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/line-numbers.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/packs/pre/long-class-name.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/empty-bytes.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/optimize/floating-sets-parent-names.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/syntax/versions.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/redundant-parentheses/extra-braces-2.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/optimize/float-abstracts.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/redundant-parentheses/extra-braces-1.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/packs/pre/as-type-optimization.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/optimize/float-and-keep-names.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/optimize/not-redundant-levels.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/syntax/pre-method.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/with-data.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-global-nonames.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/syntax/escape-sequences.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/optimize/multi-anonymous.yaml, .yamllint.yml, eo-parser/src/test/resources/org/eolang/parser/packs/add-locators.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/unphi/bool-tests.yaml, eo-parser/src/test/resources/org/eolang/parser/samples/same-name-inners.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/trailing-space-in-comment.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/sodgs/metas.yaml, eo-runtime/src/test/resources/org/eolang/snippets/all.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/unphi/new-lines.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/bindings.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/full-path.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/unphi/with-home.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/optimize/float-nested-anonymous.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/scope-before-method.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/syntax/bool-tests-straight.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/simple.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/scoped-application-after-suffix.yaml, .github/workflows/xcop.yml, eo-parser/src/test/resources/org/eolang/parser/packs/cti/cti-adds-error.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/cti/cti-adds-warning.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/unphi/spaces.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/double-empty-lines.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/all-data-types.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/syntax/text-block.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/fibonaci.yaml, .github/workflows/loc-badge.yml, eo-parser/src/test/resources/org/eolang/parser/packs/scopes.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/scopes-nested.yaml, eo-runtime/src/test/resources/org/eolang/snippets/simple.yaml, eo-runtime/src/test/resources/org/eolang/snippets/vertical-bound-methods.yaml, .github/workflows/sonar.yml, .github/workflows/yamllint.yml, eo-maven-plugin/src/test/resources/org/eolang/maven/sodgs/simple.yaml, .github/workflows/mvn.yml, eo-parser/src/test/resources/org/eolang/parser/packs/optimize/fix-names-with-duplicates.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/bool-tests.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/full-syntax.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/sodgs/vars.yaml, .github/workflows/codecov.yml, .codacy.yml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/with-anonym-abstract.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/with-free-attributes.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/syntax/vmethod-after-formation.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/onlyphi-bound.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/sodgs/rho.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/package.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/optimize/redundant-levels-with-arrays.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-only-name-duplicates.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-sparse-decoration.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/expands-aliases.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/jeo-part.yaml, eo-runtime/src/test/resources/org/eolang/snippets/simple-horizontal.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/nested.yaml, eo-runtime/src/test/resources/org/eolang/snippets/complex-horizontal.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/broken-refs.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/specials.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-prohibited-package.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/custom-alias.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/syntax/bound-reversed-application.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/sodgs/atoms.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/scopes-with-doubled-methods.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/as-phi.yaml, .github/workflows/daily.yml, eo-maven-plugin/src/test/resources/org/eolang/maven/unphi/with-anonym-abstract.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/optimize/redundant-levels.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/float-vars.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/sodgs/dot-on-ref.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/packs/pre/set-package.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/packs/pre/tests-test.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/catches/catches-incorrect-home.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/optimize/redundant-levels-with-siblings.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/const-to-dataized.yaml, .markdownlint.yml, eo-maven-plugin/src/test/resources/org/eolang/maven/packs/pre/dot-home.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/empty.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/same-name-inner.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/expand-qqs.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/iterates-over-counter.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/recursion.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/empty-vs-free.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/optimize/redundant-levels-with-arguments-and-siblings.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/atoms.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/priority/additional-brackets.yaml, eo-parser/src/test/resources/org/eolang/parser/packs/optimize/redundant-levels-with-arguments-and-abstract-parents.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/packs/pre/tests-moving-inside.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/unphi/atoms.yaml, .github/workflows/simian.yml, eo-maven-plugin/src/test/resources/org/eolang/maven/unphi/one-byte.yaml, .github/workflows/up.yml, eo-maven-plugin/src/test/resources/org/eolang/maven/unphi/long-names-inner.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/unphi/normalized.yaml, .github/workflows/ebnf.yml, eo-maven-plugin/src/test/resources/org/eolang/maven/unphi/specials.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/unphi/empty-bytes.yaml, eo-parser/src/test/resources/org/eolang/parser/typos/empty-line-before-method-2.yaml, .github/workflows/year.yml, eo-maven-plugin/src/test/resources/org/eolang/maven/binarize/add_rust/add-dependencies.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/packs/pre/converts-to-java-with-arrays-and-scopes.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml/bytes.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/packs/pre/synthetic-attributes-with-to-java.yaml, .github/workflows/gpt-code-review.yml, eo-maven-plugin/src/test/resources/org/eolang/maven/unphi/bindings.yaml, eo-maven-plugin/src/test/resources/org/eolang/maven/unphi/package.yaml

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@slry
Copy link
Contributor Author

slry commented Apr 20, 2024

@yegor256 as i noticed, yamllint fails mostly because of line-length, brackets and new-line-at-the-end-of-file.
My suggestion is either create yamllint config to mark these errors as warnings or I can create issues to clean up them.
What do you think?

@yegor256
Copy link
Member

@slry maybe it's better to clean them up in this PR? (unless they are hard to fix)

@slry
Copy link
Contributor Author

slry commented Apr 20, 2024

@yegor256, I can fix brackets and new-line-at-the-end-of-file but line-length is the hard one, since most of files that are failing is eolang syntax test files that have intended long line length that could not be fixed
For example, take a look at this syntax test

@yegor256
Copy link
Member

@slry let's allow lines to have any length in YAML files

@slry
Copy link
Contributor Author

slry commented Apr 21, 2024

@yegor256 for some reason new line at the end of file in eo-maven-plugin yaml files is a cause for test fail...

Even though it is a rule in yamllint by POSIX standard (here)

@yegor256
Copy link
Member

@slry I see that yamllint job passes in this PR. we can merge it?

@slry
Copy link
Contributor Author

slry commented Apr 21, 2024

@yegor256 yamllint job passes, but is it ok that codecov job is failing?
It seems like new line at the end of file does not parse well...

@slry
Copy link
Contributor Author

slry commented Apr 21, 2024

@yegor256 I found a solution to parsing problem
We can use |- instead of | in YAML

Test with |

eo: |
    foo
    bar

Result: "foo\nbar\n"

Test with |-

eo: |-
    foo
    bar

Result: "foo\nbar"

Is it ok if I try to fix it?

@slry
Copy link
Contributor Author

slry commented Apr 21, 2024

@yegor256 tests are passed, now we can merge it

@yegor256
Copy link
Member

@rultor merge

@rultor
Copy link
Contributor

rultor commented Apr 22, 2024

@rultor merge

@slry @yegor256 Can't merge this pull requests, because the file .rultor.yml was modified. This is a security threat. Make a separate pull request with the modification of this particular file and ask project architect to merge it manually.

@yegor256 yegor256 merged commit c0e591c into objectionary:master Apr 22, 2024
18 checks passed
@yegor256
Copy link
Member

@slry thanks!

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.

let's add yamllint GHA job
3 participants