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

Make scope optional #132

Open
hohwille opened this issue Aug 10, 2021 · 0 comments
Open

Make scope optional #132

hohwille opened this issue Aug 10, 2021 · 0 comments

Comments

@hohwille
Copy link
Member

This plugins is requiring the «scope» as mandatory package segment. This is compliant with the classic project structure.
However, with the modern project structure we made the scope optional. Our sonar plugin should therefore also accept the modern structure as valid architecture.

Therefore the scope needs to be made optional in the regex of the default config.
Also DevonPackage needs to be changed such that isValidScope() also accepts no scope. Also add a new method hasScope() to DevonPackage that checks if the package has no scope (scope is null or empty String).
See also https://github.com/devonfw/sonar-devon4j-plugin/blob/master/src/main/java/com/devonfw/ide/sonarqube/common/api/config/DevonPackageImpl.java

Also as part of this story all scope rules need to be checked that they do nothing if package.hasScope() returns false.

Also change and extend the integration tests. For packaging see:

Here the test is expected to fail and DevonArchitecturePackageCheck_NoScope.java should now be compliant to the comment needs to be removed.

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

No branches or pull requests

2 participants