Skip to content

Updated README file to improve documentation#45

Merged
kiloecho-sonar merged 35 commits into
mainfrom
kilo
Mar 4, 2026
Merged

Updated README file to improve documentation#45
kiloecho-sonar merged 35 commits into
mainfrom
kilo

Conversation

@kiloecho-sonar

Copy link
Copy Markdown
Contributor

I used claude to change the format of the README file to the more widely utilized markdown format.
I added a rudimentary workflow diagram, fixed a few mistakes with the order of arguments/options from the original README, and improved the readability to reduce user error/confusion.
This will be updated again as I improve the tool.

@okorach-sonar
okorach-sonar requested review from joshua-quek-sonarsource and removed request for okorach-sonar March 2, 2026 17:13
@okorach-sonar

Copy link
Copy Markdown
Contributor

HI @joshua-quek-sonarsource can you review the change, resolve conflicts and merge if you have permission.
I am overwhelmed, and we should be fair to @kiloecho-sonar and review quickly. TY

@joshua-quek-sonarsource

joshua-quek-sonarsource commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

Thanks @kiloecho-sonar for the improvements to the tool!

Currently, we have been following a neat pattern of rebase before merge. Thanks @okorach-sonar and @jon-lipsky-sonarsource for this:
image
...hence I recommend that the kilo branch be rebased onto main first before we continue.

Hi @kiloecho-sonar - There will be 2 main merge conflicts when kilo branch gets rebased onto main before a merge:

.gitignore - I would suggest that the final gitignore file gets both sets of ignores:
image

README.md - Augment your documentation to the existing one:
image

Let me know what you think? @kiloecho-sonar

@joshua-quek-sonarsource

joshua-quek-sonarsource commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

(interestingly, a rebase locally does not flag out src/main.py as a conflict)

@kiloecho-sonar

kiloecho-sonar commented Mar 3, 2026

Copy link
Copy Markdown
Contributor Author

@joshua-quek-sonarsource I agree with adding all of the ignores to the .ignore file. However, the README.md in the kilo branch will replace the README in main completely. There is no need to combine them as the kilo README is related to how the tool (specifically the wizard) works after the merge and the main README is useless garbage (or it was when I started working on this upgrade).

@joshua-quek-sonarsource

Copy link
Copy Markdown
Contributor

Hi @kiloecho-sonar , thanks for the swift reply. I believe that you are referring to version of the README.md from commit aa8fe0938a269e87d92666dd6904a38decc7cf09 that was made on 4th Sept last year.

Moving forward, I was not referring to that version of the README.md but was referring to the most recently README.md on commit 4a941afaa3c6b07df5221a62f706a34803080d74 that the merge conflict is happening on.

As per what @okorach-sonar @jon-lipsky-sonarsource and myself have been doing in terms if clean gitops practices before a merge, would it be possible to do a rebase onto main branch first, before we take a look at this again?

kiloecho-sonar and others added 20 commits March 4, 2026 00:22
…e documentation

Resolved merge conflicts (.gitignore, README, OLD_README) for rebase of main
Forced new lines after each phase description.  I didn't like they were appearing online before
- Add --report_type and --filename options to Report command
- Add Arguments table for Reset command (TOKEN, ENTERPRISE_KEY)
- Add Options headers for consistency across Additional Commands section
- Update Pipelines command with improved argument descriptions and Options table
- Fix token type description in Prerequisites table

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…itial request for client cert, detect failure instead and prompt
- Add sonar-project.properties with sonar.python.version=3.14 so SQC
  analyses the project as Python 3.14 rather than all Python 3 versions
- Define REQUESTS_LOG constant in main.py to resolve python:S1192
  (string literal 'requests.log' duplicated 4 times)
- Extract _is_ssl_error and _handle_extract_exception helpers from
  run_extract_phase in wizard.py to bring cognitive complexity from ~33
  down to ~10 (limit is 15)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add src/analysis_report.py: parses requests.log → CSV analysis report
- Add tests/test_analysis_report.py and tests/test_wizard/: test suites
- Add tmp/ to .gitignore as a local working/artifact directory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…r on how to bridge localhost from the docker container to the server machine
kiloecho-sonar and others added 4 commits March 4, 2026 00:40
…ty gates is skipped if there is no data. This caused a failure with validation
Bug fixes in src/pipelines/:
- unix.py: KeyError when root_dir not in mapping after cd-to-subdir;
  bashlex.parse/split errors on empty or malformed scripts not caught
- pipelines/__init__.py: AttributeError when load_module returns None
- process.py: update_pipeline_file marked is_updated=True for non-sonar
  jobs; IndexError in update_config_files when project_mappings empty;
  unhelpful KeyError in create_org_secrets for missing org; deprecated
  asyncio.get_event_loop() replaced with get_running_loop()
- scanners/cli.py: always returned is_updated=True regardless of whether
  any project mapping was applied; cognitive complexity reduced from 20
  to 9 by extracting _find_mapped_value helper
- scanners/gradle.py, dotnet.py: missing update_content() caused
  AttributeError at runtime; added no-op stubs

Tests:
- tests/test_pipelines/: 41 new unit tests covering unix.py,
  all scanner modules, GitHub pipeline parsing, and process.py
- tests/test_wizard/test_prompts.py: updated 6 localhost URL tests to
  match current behaviour (Docker bridging notice instead of rejection);
  added TestIsLocalhostUrl class for the new _is_localhost_url helper

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kiloecho-sonar

Copy link
Copy Markdown
Contributor Author

@joshua-quek-sonarsource I have completed the rebase and will fix the new issues reported by SonarQube Cloud tomorrow when I come back online

cc: @okorach & @jon-lipsky-sonarsource

@joshua-quek-sonarsource

Copy link
Copy Markdown
Contributor

Hi Keith @kiloecho-sonar , noted on this. After that once all is clear, we can proceed with the merge. Thanks!

…H actions pipeline to get coverage reporting
Comment thread src/analysis_report.py Fixed
Comment thread src/utils.py Fixed
Comment thread src/utils.py Fixed
Comment thread src/utils.py Fixed
kiloecho-sonar and others added 9 commits March 4, 2026 10:41
- Track .github/workflows/test.yml (builds test image, runs pytest with
  coverage, uploads results to SonarQube Cloud via sonarqube-scan-action)
- Remove --cov-config=/app/.coveragerc from test.Dockerfile ENTRYPOINT;
  the file was never copied into the image, causing coverage.py to error

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Formatter was used but not imported from the logging module,
causing NameError in all tests that invoke the extract command.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…resolution

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…mitted

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tests added for previously uncovered modules:
- config.py: load/validate/merge config operations
- validate.py: validate_migration function
- dependencies.py: all load strategies (each, all, chunk, map)
- utils.py: generate_run_id, filter_completed, generate_hash_id, export_csv
- operations/match_devops_platform.py: all ALM matching logic
- report/maturity/languages.py: process_languages and generate_language_markdown
- report/common/webhooks.py: process_webhook and process_delivery
- structure/templates.py: add_template and map_templates (regex and default)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@SonarSource SonarSource deleted a comment from sonarqube-agent AI Mar 4, 2026
@SonarSource SonarSource deleted a comment from sonarqube-agent AI Mar 4, 2026
@SonarSource SonarSource deleted a comment from sonarqube-agent AI Mar 4, 2026
@sonarqubecloud

sonarqubecloud Bot commented Mar 4, 2026

Copy link
Copy Markdown

SonarQube reviewer guide

Review in SonarQube

Summary: Comprehensive overhaul of README and CI/CD setup, plus extensive wizard module for guided SonarQube Server to Cloud migration with resume capability, Docker support, security hardening, and 40+ new test files covering all phases and error scenarios.

Review Focus:

  • New interactive wizard module (src/wizard/) provides guided step-by-step migration with state persistence and resume capability — critical for UX, ensure phase handlers properly save state on all code paths and validate user input before persisting
  • Security hardening across config loading and file path operations (src/config.py, src/utils.py) uses strict path validation to prevent directory traversal — verify all realpath comparisons are correct and no edge cases bypass checks
  • Comprehensive test coverage (40+ new test files) validates error handling, retry logic, and recovery scenarios — integration tests are particularly important for ensuring state transitions work end-to-end
  • Docker setup upgraded to Python 3.14 and streamlined with --no-install-recommends — verify no dependencies were accidentally removed
  • New analysis report feature generates CSV summaries of migration API calls from request logs — check that entity type classification and error extraction logic handles all SonarQube/Cloud response formats

Start review at: src/wizard/wizard.py — this is the main orchestrator for the new guided workflow. It contains

💬 Please send your feedback

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues
0 Dependency risks

Measures
0 Security Hotspots
88.7% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@kiloecho-sonar
kiloecho-sonar merged commit 1c4b2b0 into main Mar 4, 2026
3 checks passed
@joshua-quek-sonarsource

Copy link
Copy Markdown
Contributor

@kiloecho-sonar would it be possible to add the latest README.md content to the existing one? It seems like the latest README.md was fully wiped out.

What I would suggest is that we make the README.md short, and put everything in a docs/ folder where the README.md links to the relevant doc (Using Docker versus using the standalone binary .exe file from the https://github.com/sonar-solutions/sonar-reports/releases page.

@joshua-quek-sonarsource

Copy link
Copy Markdown
Contributor

Ok no worries. It is done.
#86

Thanks team!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants