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

[sonar scan] Scan public directories #190350

Merged
merged 3 commits into from
Aug 12, 2024
Merged

Conversation

jbudz
Copy link
Member

@jbudz jbudz commented Aug 12, 2024

legrego helpfully pointed out that these files should be scanned - they include client side code. The replaces the exclusion of public with target, the compiled version of this source.

legrego helpfully pointed out that these files should be scanned - they
include client side code.  The replaces the exlucsion for public with
target, the compiled version of this source.
@jbudz jbudz added Team:Operations Team label for Operations Team release_note:skip Skip the PR/issue when compiling release notes labels Aug 12, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@@ -38,7 +38,7 @@ sonar.exclusions=\
**/mock_responses/**/*, \
**/mocks/**/*, \
**/node_modules/**/*, \
**/public/**/*, \
**/target/**/*, \
**/scripts/**/*, \
Copy link
Member

@legrego legrego Aug 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not directly related, but **/scripts/**/* is a bit too broad. It excludes valid source directories such as src/plugins/data/server/scripts

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I attempted to enumerate the script directories that I don't care about in https://github.com/elastic/kibana/pull/190347/files. I can't guarantee it's correct, so use at your own risk 🙈

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with 09cbbc3 in case new folders are added. I didn't include the root level scripts directory because it's not included initially. Seem reasonable?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with 09cbbc3 in case new folders are added. I didn't include the root level scripts directory because it's not included initially. Seem reasonable?

I'm surprised that **/scripts/**/* wouldn't match the root level scripts, but if that's how it behaved before, then what you have seems fine to me.

Copy link
Member Author

@jbudz jbudz Aug 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with 09cbbc3 in case new folders are added. I didn't include the root level scripts directory because it's not included initially. Seem reasonable?

I'm surprised that **/scripts/**/* wouldn't match the root level scripts, but if that's how it behaved before, then what you have seems fine to me.

To clarify, it would match it but we're not including it in folder sources list

sonar.sources=\
packages, \
src, \
x-pack/packages, \
x-pack/plugins

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah my mistake. LGTM!

@jbudz jbudz added the skip-ci label Aug 12, 2024
@jbudz jbudz merged commit 6ca1df0 into elastic:main Aug 12, 2024
9 of 10 checks passed
@kibanamachine kibanamachine added v8.16.0 backport:skip This commit does not require backporting labels Aug 12, 2024
bryce-b pushed a commit to bryce-b/kibana that referenced this pull request Aug 13, 2024
legrego helpfully pointed out that these files should be scanned - they
include client side code. The replaces the exclusion of `public` with
`target`, the compiled version of this source.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes skip-ci Team:Operations Team label for Operations Team v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants