Skip to content

Config.cmake added#2

Merged
koudis merged 2 commits intomasterfrom
jan_kubalek/config_norm
Aug 29, 2025
Merged

Config.cmake added#2
koudis merged 2 commits intomasterfrom
jan_kubalek/config_norm

Conversation

@koudis
Copy link
Contributor

@koudis koudis commented Aug 29, 2025

Summary by CodeRabbit

  • Documentation
    • Expanded README to reference the global configuration docs and added links for easier navigation.
    • Added detailed setup and usage guide for the EXAMPLE configuration, including install/uninstall steps and renaming instructions for custom systems.
  • New Features
    • Introduced an example configuration template to help users configure package sources and authentication for different hosting providers.
  • Chores
    • Updated ignore rules to exclude build artifacts and temporary files within the configuration directory from version control.

@coderabbitai
Copy link

coderabbitai bot commented Aug 29, 2025

Warning

Rate limit exceeded

@koudis has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 15 minutes and 52 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbit review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 36493ce and 17170d2.

📒 Files selected for processing (1)
  • config/README.md (1 hunks)

Walkthrough

Adds documentation and example configuration for CMCONF: updates root README with a link to config, introduces a config-level .gitignore, adds an example CMake CMCONF config for EXAMPLE, and provides a config README with setup/installation and renaming instructions.

Changes

Cohort / File(s) Change summary
Root docs update
README.md
Added reference to CMCONF Global Config and link target to ./config/. Text-only change.
Config scaffolding and docs
config/.gitignore, config/CMCONF_EXAMPLEConfig.cmake, config/README.md
New .gitignore ignoring _build and _tmp; added example CMCONF CMake config initializing EXAMPLE system with default variables and commented alternatives; added README detailing prerequisites, installation/uninstallation, and system renaming steps with links.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I hop between configs, light and quick,
Leaving temp tracks where git won’t stick.
A README carrot points the way,
To EXAMPLE fields where CMake play.
Tokens tucked, remotes aligned—
With gentle thumps, the setup’s signed. 🥕✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jan_kubalek/config_norm

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (10)
config/.gitignore (1)

1-2: Clarify intent and future-proof ignores.

  • Treat these as directories explicitly and add a short header comment.
  • Optionally ignore common CMake artifacts if someone configures in this folder.

Apply:

+# Build/temp artifacts for config-only workflows
-_build
-_tmp
+_build/
+_tmp/
+
+# Optional: CMake artifacts if this dir gets configured accidentally
+# CMakeFiles/
+# CMakeCache.txt
+# cmake_install.cmake
README.md (1)

10-13: Polish wording and punctuation.

Capitalize the sentence, add punctuation, and keep the link reference.

-for CMCONF Global Config see [config/]
+For CMCONF global config, see [config/].
config/README.md (5)

6-9: Tighten grammar and casing in prerequisites.

Use imperative mood and consistent capitalization.

-- [cmakelib] installed
-- [example-project] forked
-- prepare Package Repository as described by [example usage documentation]
+- Install [cmakelib].
+- Fork [example-project].
+- Prepare the package repository as described in the [example usage documentation].

12-16: Clarify execution context and article usage.

Add “the” and show path from repo root to avoid ambiguity.

-The EXAMPLE config is in `CMCONF_EXAMPLEConfig.cmake` file. To install it, run following command:
+The EXAMPLE config is in the `CMCONF_EXAMPLEConfig.cmake` file. To install it, run the following command (from the repository root):
-```bash
-cmake -DCMCONF_INSTALL_AS_SYMLINK=ON -P ./CMCONF_EXAMPLEConfig.cmake
+```bash
+cmake -DCMCONF_INSTALL_AS_SYMLINK=ON -P config/CMCONF_EXAMPLEConfig.cmake

Optionally add a second example with `CMCONF_INSTALL_AS_SYMLINK=OFF` and a one‑line note on when to prefer it.

---

`18-22`: **Same grammar and path fix for uninstall.**

Mirror the install section for consistency.  


```diff
-To uninstall it, run following command:
+To uninstall it, run the following command:
-```bash
-cmake -DCMCONF_UNINSTALL=ON -P ./CMCONF_EXAMPLEConfig.cmake
+```bash
+cmake -DCMCONF_UNINSTALL=ON -P config/CMCONF_EXAMPLEConfig.cmake

26-31: Consistent list casing and add a concrete pointer.

Capitalize bullets and reference where CMLibStorage.cmake lives.

-- Rename `CMCONF_EXAMPLEConfig.cmake` to `CMCONF_XConfig.cmake`,
-- Rename `EXAMPLE` to `X` in `CMCONF_XConfig.cmake`,
-- rename `EXAMPLE` to `X` in `CMLibStorage.cmake` in the forked example-project Git repository.
-- Install `CMCONF_XConfig.cmake` as described above.
+- Rename `CMCONF_EXAMPLEConfig.cmake` to `CMCONF_XConfig.cmake`.
+- Rename `EXAMPLE` to `X` in `CMCONF_XConfig.cmake`.
+- Rename `EXAMPLE` to `X` in `CMLibStorage.cmake` in the forked `example-project` repository (path: `cmake/CMLibStorage.cmake`, verify in your fork).
+- Install `CMCONF_XConfig.cmake` as described above.

35-36: markdownlint MD034: acceptable exception or disable locally.

These are reference-style link definitions; MD034 can be safely disabled around them.

+[//]: # "markdownlint-disable MD034"
 [cmakelib]: https://github.com/cmakelib/cmakelib
 [example usage documentation]: https://bacpack-system.github.io/example_usage
+[//]: # "markdownlint-enable MD034"
config/CMCONF_EXAMPLEConfig.cmake (3)

5-7: Nit: prefer canonical lowercase for built-ins.

CMake commands are case-insensitive, but lowercase improves readability.

-FIND_PACKAGE(CMLIB REQUIRED COMPONENTS CMCONF)
+find_package(CMLIB REQUIRED COMPONENTS CMCONF)

20-26: Prefer environment- or cache-driven auth; never commit secrets.

Promote the ENV example to primary, leave empty-string as fallback.

-CMCONF_SET(BA_PACKAGE_HTTP_AUTHORIZATION_HEADER "")
+CMCONF_SET(BA_PACKAGE_HTTP_AUTHORIZATION_HEADER "$ENV{ACCESS_TOKEN_ROCKS}")
+# Fallback (no auth required)
+if(NOT BA_PACKAGE_HTTP_AUTHORIZATION_HEADER)
+  CMCONF_SET(BA_PACKAGE_HTTP_AUTHORIZATION_HEADER "")
+endif()

I can add a brief note in config/README.md explaining the expected env var.


33-50: Document placeholder semantics inline.

Add a one-liner to prevent confusion around <GIT_PATH>/<PACKAGE_GROUP_NAME>/<ARCHIVE_NAME>.

 #
 # Gitea hosted public Package Repository:
 #
+# Placeholders:
+#  - <REVISION>: branch, tag, or commit SHA
+#  - <GIT_PATH>: path within the repo (e.g., org/project)
+#  - <PACKAGE_GROUP_NAME>: logical package group
+#  - <ARCHIVE_NAME>: tarball/zip file name
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 16d5999 and 36493ce.

📒 Files selected for processing (4)
  • README.md (1 hunks)
  • config/.gitignore (1 hunks)
  • config/CMCONF_EXAMPLEConfig.cmake (1 hunks)
  • config/README.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
config/README.md

[grammar] ~6-~6: There might be a mistake here.
Context: ...## Prerequisites - [cmakelib] installed - [example-project] forked - prepare Packa...

(QB_NEW_EN)


[grammar] ~12-~12: There might be a mistake here.
Context: ...AMPLEConfig.cmake` file. To install it, run following command: ```bash cmake -DCMC...

(QB_NEW_EN)


[grammar] ~18-~18: There might be a mistake here.
Context: ...AMPLEConfig.cmake To uninstall it, run following command: bash cmake -DCMC...

(QB_NEW_EN)


[grammar] ~29-~29: There might be a mistake here.
Context: ...AMPLEtoXinCMCONF_XConfig.cmake, - rename EXAMPLEtoXinCMLibStorage...

(QB_NEW_EN)


[grammar] ~30-~30: There might be a mistake here.
Context: ...e forked example-project Git repository. - Install CMCONF_XConfig.cmake as descri...

(QB_NEW_EN)

🪛 markdownlint-cli2 (0.17.2)
config/README.md

35-35: Bare URL used

(MD034, no-bare-urls)


36-36: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (1)
config/CMCONF_EXAMPLEConfig.cmake (1)

30-32: Make BA_PACKAGE_URI_REVISION overrideable and avoid hardcoding “master”. Introduce a CMake CACHE variable (e.g. CMCONF_EXAMPLE_URI_REVISION) that defaults to $ENV{CMCONF_URI_REVISION} or “main”, then pass it into CMCONF_SET. Verify that the CMCONF_SET macro handles this override as expected and that no downstream consumers still rely on “master”.

@koudis koudis merged commit 158067c into master Aug 29, 2025
1 check passed
@koudis koudis deleted the jan_kubalek/config_norm branch February 22, 2026 13:36
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.

2 participants