René's URL Explorer Experiment


Title: Fix SonarQube double indexing in flat layout by excluding tests from sources by Copilot · Pull Request #1091 · usethis-python/usethis-python · GitHub

Open Graph Title: Fix SonarQube double indexing in flat layout by excluding tests from sources by Copilot · Pull Request #1091 · usethis-python/usethis-python

X Title: Fix SonarQube double indexing in flat layout by excluding tests from sources by Copilot · Pull Request #1091 · usethis-python/usethis-python

Description: Analyze the current SonarQube configuration code Modify get_sonar_project_properties() to automatically exclude tests/* when using flat layout (sources=./) Add regression tests for flat layout with and without custom exclusions Run existing tests to ensure no regressions (16/16 SonarQube tests pass) Code review completed and feedback addressed Removed redundant list() cast on line 67 Added comment to clarify TypeAdapter(list).validate_python() returns a list Changed from append to prepend (insert at index 0) for exclusion Changed exclusion syntax from ./tests to tests/* for proper SonarQube pattern matching Type checking passed (pyright: 0 errors, 0 warnings) Linting passed (ruff: all checks passed) Summary Fixed SonarQube configuration to properly exclude the tests directory when using flat layout to prevent double indexing. The fix ensures that sonar.sources and sonar.tests directories are disjoint by prepending tests/* to the exclusions list. Updated based on PR feedback to use the correct SonarQube exclusion pattern syntax (tests/* instead of ./tests). Fixes #1090 Original prompt This section details on the original issue you should resolve Properly configure SonarQube source dir when tests and source dir overlap These directories need to be disjoint. When using src layout, this works fine: sonar.sources=./src sonar.tests=./tests But if we have a flat layout, this doesn't work, because files get indexed twice: sonar.sources=./ sonar.tests=./tests The exclusions should simply be set/augmented to always include ./tests via comma separation and this will fix the issue. Test strategy is probably just regression-style unit tests to make sure the config contents are sound, and then I'll test them manually on a live pipeline. Comments on the Issue (you are @copilot in this section) Fixes #1090 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Open Graph Description: Analyze the current SonarQube configuration code Modify get_sonar_project_properties() to automatically exclude tests/* when using flat layout (sources=./) Add regression tests for flat layout wi...

X Description: Analyze the current SonarQube configuration code Modify get_sonar_project_properties() to automatically exclude tests/* when using flat layout (sources=./) Add regression tests for flat layout wi...

Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1091

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:9080ff54-a629-e54b-3a67-6ba6906aa0db
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD8AC:1ED3:4BE205:626878:6A4D8D92
html-safe-nonce9fbf1e4af3cae481b0fe9f65e665feb51861dea2b6cf1eeeb2d65330cdf04a31
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEFDOjFFRDM6NEJFMjA1OjYyNjg3ODo2QTREOEQ5MiIsInZpc2l0b3JfaWQiOiIzODY0MTAwODA0MzI4NTI1MjAyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacd140e3299983bc5fbea1dc3401b7cc2eaaec5a83cfc9a3977a0d56169856867d
hovercard-subject-tagpull_request:2979961774
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/usethis-python/usethis-python/pull/1091/files
twitter:imagehttps://avatars.githubusercontent.com/in/1143301?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/in/1143301?s=400&v=4
og:image:altAnalyze the current SonarQube configuration code Modify get_sonar_project_properties() to automatically exclude tests/* when using flat layout (sources=./) Add regression tests for flat layout wi...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/usethis-python/usethis-python git https://github.com/usethis-python/usethis-python.git
octolytics-dimension-user_id216362695
octolytics-dimension-user_loginusethis-python
octolytics-dimension-repository_id842189705
octolytics-dimension-repository_nwousethis-python/usethis-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id842189705
octolytics-dimension-repository_network_root_nwousethis-python/usethis-python
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release74e2a9c78f1e38588de4f25885878349d721eedf
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/usethis-python/usethis-python/pull/1091/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fusethis-python%2Fusethis-python%2Fpull%2F1091%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fusethis-python%2Fusethis-python%2Fpull%2F1091%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=usethis-python%2Fusethis-python
Reloadhttps://github.com/usethis-python/usethis-python/pull/1091/files
Reloadhttps://github.com/usethis-python/usethis-python/pull/1091/files
Reloadhttps://github.com/usethis-python/usethis-python/pull/1091/files
Please reload this pagehttps://github.com/usethis-python/usethis-python/pull/1091/files
usethis-python https://github.com/usethis-python
usethis-pythonhttps://github.com/usethis-python/usethis-python
Notifications https://github.com/login?return_to=%2Fusethis-python%2Fusethis-python
Fork 5 https://github.com/login?return_to=%2Fusethis-python%2Fusethis-python
Star 19 https://github.com/login?return_to=%2Fusethis-python%2Fusethis-python
Code https://github.com/usethis-python/usethis-python
Issues 163 https://github.com/usethis-python/usethis-python/issues
Pull requests 4 https://github.com/usethis-python/usethis-python/pulls
Actions https://github.com/usethis-python/usethis-python/actions
Security and quality 0 https://github.com/usethis-python/usethis-python/security
Insights https://github.com/usethis-python/usethis-python/pulse
Code https://github.com/usethis-python/usethis-python
Issues https://github.com/usethis-python/usethis-python/issues
Pull requests https://github.com/usethis-python/usethis-python/pulls
Actions https://github.com/usethis-python/usethis-python/actions
Security and quality https://github.com/usethis-python/usethis-python/security
Insights https://github.com/usethis-python/usethis-python/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fusethis-python%2Fusethis-python%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fusethis-python%2Fusethis-python%2Fissues%2Fnew%2Fchoose
nathanjmcdougallhttps://github.com/nathanjmcdougall
mainhttps://github.com/usethis-python/usethis-python/tree/main
copilot/fix-sonarqube-source-dir-configurationhttps://github.com/usethis-python/usethis-python/tree/copilot/fix-sonarqube-source-dir-configuration
Conversation 8 https://github.com/usethis-python/usethis-python/pull/1091
Commits 5 https://github.com/usethis-python/usethis-python/pull/1091/commits
Checks 35 https://github.com/usethis-python/usethis-python/pull/1091/checks
Files changed https://github.com/usethis-python/usethis-python/pull/1091/files
Please reload this pagehttps://github.com/usethis-python/usethis-python/pull/1091/files
Fix SonarQube double indexing in flat layout by excluding tests from sources https://github.com/usethis-python/usethis-python/pull/1091/files#top
Show all changes 5 commits https://github.com/usethis-python/usethis-python/pull/1091/files
f67c580 Initial plan Copilot Nov 5, 2025 https://github.com/usethis-python/usethis-python/pull/1091/commits/f67c580ce40f50d73fd4ce1ef60780fe9bcfde8c
0811cdf Fix SonarQube config to exclude tests dir in flat layout Copilot Nov 5, 2025 https://github.com/usethis-python/usethis-python/pull/1091/commits/0811cdffe40f0a682f21bac453766ccf98cebe43
fa76d60 Address PR feedback: remove redundant cast, prepend ./tests to exclus… Copilot Nov 5, 2025 https://github.com/usethis-python/usethis-python/pull/1091/commits/fa76d60b23f56808ae597df43e8d071f10e25d8a
912e650 Merge branch 'main' into copilot/fix-sonarqube-source-dir-configuration nathanjmcdougall Nov 5, 2025 https://github.com/usethis-python/usethis-python/pull/1091/commits/912e650819a5a7c8dca781a525c42ab9b711c226
ab7bfb5 Change exclusion syntax from ./tests to tests/* Copilot Nov 5, 2025 https://github.com/usethis-python/usethis-python/pull/1091/commits/ab7bfb5ca0b03262206e5bac503d8e684a538853
Clear filters https://github.com/usethis-python/usethis-python/pull/1091/files
Please reload this pagehttps://github.com/usethis-python/usethis-python/pull/1091/files
Please reload this pagehttps://github.com/usethis-python/usethis-python/pull/1091/files
config.py https://github.com/usethis-python/usethis-python/pull/1091/files#diff-fa1d3c332b7035c9071c8f179e9767f64c65ef31cc696dde3c777309f004a27a
test_sonarqube_config.py https://github.com/usethis-python/usethis-python/pull/1091/files#diff-c2990811e202206ad7ed278d24a0dfa7fb8ba7bde2e615c99cc6f3956f3cbf9f
src/usethis/_integrations/sonarqube/config.pyhttps://github.com/usethis-python/usethis-python/pull/1091/files#diff-fa1d3c332b7035c9071c8f179e9767f64c65ef31cc696dde3c777309f004a27a
View file https://github.com/usethis-python/usethis-python/blob/ab7bfb5ca0b03262206e5bac503d8e684a538853/src/usethis/_integrations/sonarqube/config.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/usethis-python/usethis-python/pull/1091/{{ revealButtonHref }}
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-fa1d3c332b7035c9071c8f179e9767f64c65ef31cc696dde3c777309f004a27a
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-fa1d3c332b7035c9071c8f179e9767f64c65ef31cc696dde3c777309f004a27a
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-fa1d3c332b7035c9071c8f179e9767f64c65ef31cc696dde3c777309f004a27a
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-fa1d3c332b7035c9071c8f179e9767f64c65ef31cc696dde3c777309f004a27a
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-fa1d3c332b7035c9071c8f179e9767f64c65ef31cc696dde3c777309f004a27a
tests/usethis/_integrations/sonarqube/test_sonarqube_config.pyhttps://github.com/usethis-python/usethis-python/pull/1091/files#diff-c2990811e202206ad7ed278d24a0dfa7fb8ba7bde2e615c99cc6f3956f3cbf9f
View file https://github.com/usethis-python/usethis-python/blob/ab7bfb5ca0b03262206e5bac503d8e684a538853/tests/usethis/_integrations/sonarqube/test_sonarqube_config.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/usethis-python/usethis-python/pull/1091/{{ revealButtonHref }}
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-c2990811e202206ad7ed278d24a0dfa7fb8ba7bde2e615c99cc6f3956f3cbf9f
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-c2990811e202206ad7ed278d24a0dfa7fb8ba7bde2e615c99cc6f3956f3cbf9f
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-c2990811e202206ad7ed278d24a0dfa7fb8ba7bde2e615c99cc6f3956f3cbf9f
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-c2990811e202206ad7ed278d24a0dfa7fb8ba7bde2e615c99cc6f3956f3cbf9f
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-c2990811e202206ad7ed278d24a0dfa7fb8ba7bde2e615c99cc6f3956f3cbf9f
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-c2990811e202206ad7ed278d24a0dfa7fb8ba7bde2e615c99cc6f3956f3cbf9f
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-c2990811e202206ad7ed278d24a0dfa7fb8ba7bde2e615c99cc6f3956f3cbf9f
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-c2990811e202206ad7ed278d24a0dfa7fb8ba7bde2e615c99cc6f3956f3cbf9f
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-c2990811e202206ad7ed278d24a0dfa7fb8ba7bde2e615c99cc6f3956f3cbf9f
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-c2990811e202206ad7ed278d24a0dfa7fb8ba7bde2e615c99cc6f3956f3cbf9f
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-c2990811e202206ad7ed278d24a0dfa7fb8ba7bde2e615c99cc6f3956f3cbf9f
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-c2990811e202206ad7ed278d24a0dfa7fb8ba7bde2e615c99cc6f3956f3cbf9f
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-c2990811e202206ad7ed278d24a0dfa7fb8ba7bde2e615c99cc6f3956f3cbf9f
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-c2990811e202206ad7ed278d24a0dfa7fb8ba7bde2e615c99cc6f3956f3cbf9f
https://github.com/usethis-python/usethis-python/pull/1091/files#diff-c2990811e202206ad7ed278d24a0dfa7fb8ba7bde2e615c99cc6f3956f3cbf9f
Please reload this pagehttps://github.com/usethis-python/usethis-python/pull/1091/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.