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

extractor: YML for list of projects #106

Closed
romani opened this issue Jul 7, 2024 · 1 comment · Fixed by #203
Closed

extractor: YML for list of projects #106

romani opened this issue Jul 7, 2024 · 1 comment · Fixed by #203

Comments

@romani
Copy link
Member

romani commented Jul 7, 2024

Diff.groovy(corresponding java project) is updated to use YML format of list-of-projects.properties and Extractor is updated to work with list-of-projects.yaml

Discussion started at checkstyle/contribution#866
but we did not come to agreeement.


We have now very weird format of project list.
https://github.com/checkstyle/test-configs/blob/main/extractor/src/main/resources/all-projects.properties
It was quick and old decision. It was format for bash language, we deprecated this version a long time ago.
Let's do yaml format for it.
All long lists, should become elements of array in yaml.

Conceptually, we can use any other type that will allow us to make single line in existing format to be multiple lines that easily to manage.

Look at jdk lines to feel a pain of existing format.

existing: #checkstyle|git|https://github.com/checkstyle/checkstyle.git|master|**/.ci-temp/**/*,**/resources-noncompilable/**/asttreestringprinter/**/*,**/resources-noncompilable/**/filefilters/**/*,**/resources-noncompilable/**/main/**/*,**/resources-noncompilable/**/suppressionsstringprinter/**/*,**/resources-noncompilable/**/gui/**/*,**/resources-noncompilable/**/javadocpropertiesgenerator/**/*,src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/javaparser/InputJavaParser.java,**/InputAllEscapedUnicodeCharacters.java,**/resources-noncompilable/**/javaparser/InputJavaParser.java,**/resources-noncompilable/**/checks/imports/unusedimports/InputUnusedImportsSingleWordPackage.java,**/resources-noncompilable/**/grammar/java19/*,**/resources-noncompilable/**/treewalker/**/*

proposed:

projects:
  - sevntu-checkstyle:
    - scm: git
    - url: https://github.com/sevntu-checkstyle/sevntu.checkstyle
    - reference: master
  - spotbugs:
    - scm: git
    - url: https://github.com/spotbugs/spotbugs
    - reference: 3.1.2
  # Those projects are quite old and have lot of legacy code
  - apache-jsecurity:
    - scm: git
    - url: https://github.com/apache/jsecurity
    - reference: c2ac5b90a467aedb04b52ae50a99e83207d847b3
  - apache-struts
    - scm: git
    - url: https://github.com/apache/struts.git
    - branch: master
    - excludes:
      - **/apache-struts/**/resources/**/*
  - checkstyle:
    - scm: git
    - url: https://github.com/checkstyle/checkstyle.git
    - reference: master
    - excludes:
      - **/.ci-temp/**/*
      - **/resources-noncompilable/**/asttreestringprinter/**/*
      - **/resources-noncompilable/**/filefilters/**/*
      - **/resources-noncompilable/**/main/**/*
      - **/resources-noncompilable/**/suppressionsstringprinter/**/*
      - **/resources-noncompilable/**/gui/**/*
      - **/resources-noncompilable/**/javadocpropertiesgenerator/**/*
      - src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/javaparser/InputJavaParser.java
      # 'InputAllEscapedUnicodeCharacters' must be skipped because it is too big and slows down JXR
      - **/InputAllEscapedUnicodeCharacters.java
      - **/resources-noncompilable/**/javaparser/InputJavaParser.java
      - **/resources-noncompilable/**/checks/imports/unusedimports/InputUnusedImportsSingleWordPackage.java
      - **/resources-noncompilable/**/grammar/java19/*
      - **/resources-noncompilable/**/treewalker/**/*

main reason of updaate is exclusion list, that is long, especially i jdk.

project that new workflow will use instead of diff.groovy, should allow yml config.

@romani romani changed the title Diff.groovy (corresponding java project) is updated to use YML for list of projects Extractor is updated to use YML for list of projects Jul 20, 2024
@romani romani changed the title Extractor is updated to use YML for list of projects extractor: YML for list of projects Sep 8, 2024
@romani
Copy link
Member Author

romani commented Sep 30, 2024

example of current files https://github.com/checkstyle/test-configs/tree/main/AbbreviationAsWordInName/Example1

Folder structure is:
README.md
config.xml
list-of-projects.properties
list-of-projects.yml

Now we have: list-of-projects.properties
and it works for both workflows diff.yml and regression-report.yml .

We should keep list-of-projects.properties as it is used by diff.yml (old workflow).
We need to introduce new file list-of-projects.yml that by functional content will be "same" as list-of-projects.properties, with only difference of formatting.

Folder structure will be:
README.md
config.xml
list-of-projects.properties
list-of-projects.yml

diff.yml workflow will use list-of-projects.properties
regression-report.yml workflow will use list-of-projects.yml

diff-java-tool will have a logic to load list of properties by extension, if CLI put *.property file it loads it as property file, if *.yml it loads it as yaml.

regression-report.yml will download yml file and put yml file as argument value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant