Analysis ID "AZMwS-SUJemnyI2aAJcP" and overlaps

Hi there,

Unfortunately, I can’t get round an issue about overlapping files in sources and tests.
My sources are stored from the root of the project, and the tests are stored in the folders tests/ and _dev/tests.

Last analysis failed
Analysis ID “AZMwS-SUJemnyI2aAJcP”

We detected a configuration error for your analysis with ID “AZMwS-SUJemnyI2aAJcP”: the source and tests files overlap.

The contents of the file is the following:

# Path to sources
sonar.sources=.
sonar.exclusions=tests/,_dev/tests/,storybook/

# Path to tests
# sonar.test.exclusions=./
sonar.tests=tests/,_dev/tests/
# sonar.tests=tests/,_dev/tests/

# Exclusions for copy-paste detection
sonar.cpd.exclusions=tests/,_dev/tests/,storybook/stories/

And the related branch is GitHub - Quetzacoalt91/autoupgrade at fix-build-workflow.

How can fix the configuration to have the tests properly configured without colliding with the sources?

Thanks in advance.

Hi,

Welcome to the community!

I would expect your configuration to work. Can you post your analysis log, or point us to it?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Ann

Thanks Ann, I managed to get more feedback by running via the GitHub actions.

This is the configuration I needed to write to make it work as expected.

sonar.sources=.
sonar.exclusions=**/tests/**,**/storybook/**

# Path to tests
sonar.tests=tests/,_dev/tests/

# Exclusions for copy-paste detection
sonar.cpd.exclusions=**/tests/**,**/storybook/stories/**

The wildcard are important when allowed by the field.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.