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

clean: Clarify the version of Codacy configuration file considered DOCS-677 #2102

Merged
merged 7 commits into from
Jun 24, 2024
10 changes: 6 additions & 4 deletions docs/repositories-configure/codacy-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ Codacy supports configuring certain advanced features through a configuration fi
## Using a Codacy configuration file

!!! important
If your repository has a Codacy configuration file, the [Ignored files settings](ignoring-files.md) defined on the Codacy UI don't apply and you must [ignore files using the configuration file](#syntax-for-ignoring-files) instead.
- If your repository has a Codacy configuration file, the [Ignored files settings](ignoring-files.md) defined on the Codacy UI don't apply and you must [ignore files using the configuration file](#syntax-for-ignoring-files) instead.
- Except for [ignored files](#ignore-files), Codacy uses the version of the configuration file **in the branch being analyzed**. For example, if a pull request modifies the Codacy configuration file, Codacy uses the updated configuration file to analyze that pull request.

To use a Codacy configuration file:

Expand Down Expand Up @@ -73,9 +74,10 @@ To use a Codacy configuration file:

The Codacy configuration file gives you more flexibility in [ignoring or excluding files](ignoring-files.md) from the Codacy analysis.

!!! note
{% include-markdown "../assets/includes/coverage-ignore.md" %}

!!! important
- If the Codacy configuration file **in the default branch** includes settings to ignore files, that version takes precedence over the ignore settings defined **in the branch being analyzed**. For example, if a pull request removes an ignored path from the Codacy configuration file, any matching files will stay ignored until that pull request is merged into the default branch.
- {% include-markdown "../assets/includes/coverage-ignore.md" %}

### Syntax for ignoring files

To ignore files using a Codacy configuration file, you must define one or more patterns under `exclude_paths` using the [Java glob syntax](https://docs.oracle.com/javase/7/docs/api/java/nio/file/FileSystem.html#getPathMatcher%28java.lang.String%29):
Expand Down
Loading