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

.jqassistant.yml of a maven module not or only partially applied #83

Open
bragern opened this issue Nov 14, 2023 · 1 comment
Open

.jqassistant.yml of a maven module not or only partially applied #83

bragern opened this issue Nov 14, 2023 · 1 comment
Assignees
Labels
type:bug Software shows incorrect behavior or delivers incorrect results
Milestone

Comments

@bragern
Copy link

bragern commented Nov 14, 2023

See example in my github: https://github.com/bragern/jqa-groups-test/tree/main/jqa-groups-test
(sorry, already had it written in my format but it translates well to yours)

Two Issues observed there

1) Not recognizing groups configured in '.jqassistant.yml' of a maven module when building parent

steps to recreate

  • execute 'mvn clean install' on 'jqa-groups-test/jqa-groups-test-module/'
  • execute 'mvn clean install' on 'jqa-groups-test/'
  • compare build logs

observed

  • On 'jqa-groups-test-module/' analysis happens in 'jqassistant-maven-plugin:2.0.8:analyze':

    • [INFO] --- jqassistant-maven-plugin:2.0.8:analyze (default-cli) @ jqa-groups-test-module ---
    • [INFO] Rules directory 'C:\MyFiles\projects\jqa-groups-test\jqa-groups-test\jqa-groups-test-module\jqassistant' does not exist, skipping.
    • [INFO] Executing analysis for 'jqa-groups-test-module'.
    • ...
  • On 'jqa-groups-test/' nothing happens in 'jqassistant-maven-plugin:2.0.8:analyze':

    • [INFO] --- jqassistant-maven-plugin:2.0.8:analyze (default-cli) @ jqa-groups-test-module ---
    • [INFO]
    • [INFO] --- maven-install-plugin:2.4:install (default-install) @ jqa-groups-test-module ---

expected

No matter if the build is started from parent or module, the configured group in '.jqassistant.yml' of the
module should be used for jqa analysis.

As you can see in issue 2) the '.jqassistant.yml' is definitely used in both cases but the configured groups
seem to be ignored.

2) Not recognizing '.jqassistant.yml' of a maven module at all when building parent

steps to recreate

  • remove 'configurationLocation' from 'jqa-groups-test/jqa-groups-test-module/.jqassistant.yml'
  • execute 'mvn clean install' on 'jqa-groups-test/jqa-groups-test-module/'
  • execute 'mvn clean install' on 'jqa-groups-test/'
  • compare build logs

observed

  • On 'jqa-groups-test-module/' right before 'jqassistant-maven-plugin:2.0.8:analyze' 'src/main' is entered
    • '[INFO] Entering src/main'
  • On 'jqa-groups-test/' right before 'jqassistant-maven-plugin:2.0.8:analyze' 'src/main' is not entered

I also observed other parameters not to be used from the yml so it seems the entire yml is not loaded at all.

expected

No matter if the build is started from parent or module, the '.jqassistant.yml' of the module should be used
during module build

@bragern bragern added the type:bug Software shows incorrect behavior or delivers incorrect results label Nov 14, 2023
@bragern bragern changed the title Bug: .jqassistant.yml of a maven module not or only partially applied .jqassistant.yml of a maven module not or only partially applied Nov 14, 2023
@DirkMahler DirkMahler self-assigned this Nov 25, 2023
@DirkMahler DirkMahler added this to the 2.1 milestone Nov 25, 2023
@DirkMahler DirkMahler modified the milestones: 2.1, 2.2 Jan 15, 2024
@DirkMahler
Copy link
Member

The implementation has been extended such that .jQAssistant.yml files are evaluated from the reactor execution root as well as from the current module. This allows for project-wide configs as well as module specific configs, e.g. additional includes for the scanner. Note that some settings (e.g. store) are always applied globally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Software shows incorrect behavior or delivers incorrect results
Projects
None yet
Development

No branches or pull requests

2 participants