docs: expand README with setup, linting, and contributing guide#825
docs: expand README with setup, linting, and contributing guide#825Tech-Psycho95 wants to merge 1 commit into
Conversation
Signed-off-by: SHIVAM <shivamsingh.smn@gmail.com>
WalkthroughThe README is restructured from a brief overview into a comprehensive operational guide. It now includes project badges, expanded ecosystem context, user prerequisites and installation steps, maintainer publishing and linting instructions, CI/CD workflow documentation, contribution guidelines, related repository links, and community resources. ChangesREADME Documentation Restructure
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Line 173: Update the README sentence that currently uses "Git hub" or
incorrect casing so it reads "The workflow file lives at .github/workflows/."
with the correct official casing "GitHub" (capital G and H); locate the sentence
in README.md and replace the existing word with "GitHub" to ensure consistent
branding.
- Around line 118-127: The README mismatch: TARGET_BRANCH is set to 'gh-pages'
but the ct lint invocation hardcodes --target-branch=master; update the ct lint
command to use the TARGET_BRANCH variable (replace --target-branch=master with
--target-branch=$TARGET_BRANCH) or align the TARGET_BRANCH value to 'master' so
TARGET_BRANCH and the ct lint invocation (ct lint ... --target-branch=...) are
consistent; locate the TARGET_BRANCH declaration and the ct lint call in the
README and make them match.
- Around line 149-160: Update the three sed substitution patterns to use POSIX
character class [[:space:]] instead of the GNU-only \s (i.e., change "s/\s*$//g"
to "s/[[:space:]]*$//g", "s/:\s\s*/: /g" to "s/:[[:space:]][[:space:] ]*/: /g"
or more simply "s/:[[:space:]]\{1,\}/: /g", and "s/-\s\s*/- /g" to
"s/-[[:space:]]\{1,\}/- /g") so they work with BSD/POSIX sed; keep the same
quoting and flags as used in the README examples and ensure the empty-line
trimming command remains unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| CONFIG_FILE='.github/chart-testing-config.yaml' | ||
| CHART_DIR='charts' | ||
| TARGET_ORIGIN='origin' | ||
| TARGET_BRANCH='gh-pages' | ||
| LOG_FILE="./helm-lint-$CHART_DIR.log" | ||
|
|
||
| ct lint --config=$CONFIG_FILE \ | ||
| --chart-dirs=$CHART_DIR \ | ||
| --remote=$TARGET_ORIGIN \ | ||
| --target-branch=master |
There was a problem hiding this comment.
Use one target branch source in lint docs.
Line 121 sets TARGET_BRANCH='gh-pages', but Line 127 hardcodes --target-branch=master. This is inconsistent and can mislead maintainers running the command.
Suggested fix
TARGET_ORIGIN='origin'
-TARGET_BRANCH='gh-pages'
+TARGET_BRANCH='master'
LOG_FILE="./helm-lint-$CHART_DIR.log"
ct lint --config=$CONFIG_FILE \
--chart-dirs=$CHART_DIR \
--remote=$TARGET_ORIGIN \
- --target-branch=master
+ --target-branch=$TARGET_BRANCH📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| CONFIG_FILE='.github/chart-testing-config.yaml' | |
| CHART_DIR='charts' | |
| TARGET_ORIGIN='origin' | |
| TARGET_BRANCH='gh-pages' | |
| LOG_FILE="./helm-lint-$CHART_DIR.log" | |
| ct lint --config=$CONFIG_FILE \ | |
| --chart-dirs=$CHART_DIR \ | |
| --remote=$TARGET_ORIGIN \ | |
| --target-branch=master | |
| CONFIG_FILE='.github/chart-testing-config.yaml' | |
| CHART_DIR='charts' | |
| TARGET_ORIGIN='origin' | |
| TARGET_BRANCH='master' | |
| LOG_FILE="./helm-lint-$CHART_DIR.log" | |
| ct lint --config=$CONFIG_FILE \ | |
| --chart-dirs=$CHART_DIR \ | |
| --remote=$TARGET_ORIGIN \ | |
| --target-branch=$TARGET_BRANCH |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@README.md` around lines 118 - 127, The README mismatch: TARGET_BRANCH is set
to 'gh-pages' but the ct lint invocation hardcodes --target-branch=master;
update the ct lint command to use the TARGET_BRANCH variable (replace
--target-branch=master with --target-branch=$TARGET_BRANCH) or align the
TARGET_BRANCH value to 'master' so TARGET_BRANCH and the ct lint invocation (ct
lint ... --target-branch=...) are consistent; locate the TARGET_BRANCH
declaration and the ct lint call in the README and make them match.
| ```bash | ||
| # Remove trailing spaces | ||
| sed -i 's/\s*$//g' <path/to/yaml/file> | ||
|
|
||
| # Remove extra spaces after ": " | ||
| sed -i 's/:\s\s*/: /g' <path/to/yaml/file> | ||
|
|
||
| # Remove extra spaces after "- " | ||
| sed -i 's/-\s\s*/- /g' <path/to/yaml/file> | ||
|
|
||
| # Remove empty lines from beginning and end | ||
| sed -i -e '/./,$!d' -e :a -e '/^\n*$/{$d;N;ba' -e '}' <path/to/yaml/file> |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify whether '\s' works as intended in sed on your environment (read-only check)
set -euo pipefail
input='key: value '
echo "Input: [$input]"
echo "$input" | sed 's/\s*$//g' | awk '{print "Using \\s -> ["$0"]"}'
echo "$input" | sed 's/[[:space:]]*$//g' | awk '{print "Using [[:space:]] -> ["$0"]"}'Repository: mosip/mosip-helm
Length of output: 151
🏁 Script executed:
# Locate and verify the README.md file
cd mosip-helm && git ls-files | grep -i readmeRepository: mosip/mosip-helm
Length of output: 121
🏁 Script executed:
# Check the exact lines in README.md (lines 149-160)
sed -n '149,160p' README.mdRepository: mosip/mosip-helm
Length of output: 407
🏁 Script executed:
# Check broader context around these lines
sed -n '140,170p' README.mdRepository: mosip/mosip-helm
Length of output: 785
🏁 Script executed:
# Search for other sed patterns in the codebase to understand usage patterns
rg 'sed\s+' README.mdRepository: mosip/mosip-helm
Length of output: 401
🏁 Script executed:
# Check if there are any mentions of supported systems/environments
rg -i 'macos|linux|windows|bsd|environment|prerequisite' README.md | head -20Repository: mosip/mosip-helm
Length of output: 77
🏁 Script executed:
# Verify the actual behavior of \s in POSIX sed vs GNU sed context
cat > /tmp/test_sed.sh << 'EOF'
#!/bin/bash
input='key: value '
echo "Test 1: Using \\s (GNU extension)"
echo "$input" | sed 's/\s*$//g'
echo "Result: $?"
echo ""
echo "Test 2: Using [[:space:]] (POSIX portable)"
echo "$input" | sed 's/[[:space:]]*$//g'
echo "Result: $?"
echo ""
echo "Test 3: Actual sed version"
sed --version 2>/dev/null || sed -h 2>/dev/null | head -1
EOF
bash /tmp/test_sed.shRepository: mosip/mosip-helm
Length of output: 847
🏁 Script executed:
# Check if there's documentation about supported platforms or environments
rg -i 'supported|platform|os|macos|windows|linux' README.md | head -20Repository: mosip/mosip-helm
Length of output: 1277
🏁 Script executed:
# Check the Prerequisites section fully
sed -n '130,145p' README.mdRepository: mosip/mosip-helm
Length of output: 352
🏁 Script executed:
# Search for any mentions of how users should run these sed commands
rg -B5 -A2 'Remove trailing spaces|Remove extra spaces' README.mdRepository: mosip/mosip-helm
Length of output: 402
Replace \s with [[:space:]] for POSIX sed portability.
Lines 151, 154, and 157 use \s, which is a GNU sed extension not recognized by POSIX/BSD sed (standard on macOS). These commands will silently fail to normalize spacing on systems using non-GNU sed.
Suggested fix
# Remove trailing spaces
-sed -i 's/\s*$//g' <path/to/yaml/file>
+sed -i 's/[[:space:]]*$//g' <path/to/yaml/file>
# Remove extra spaces after ": "
-sed -i 's/:\s\s*/: /g' <path/to/yaml/file>
+sed -i 's/:[[:space:]][[:space:]]*/: /g' <path/to/yaml/file>
# Remove extra spaces after "- "
-sed -i 's/-\s\s*/- /g' <path/to/yaml/file>
+sed -i 's/-[[:space:]][[:space:]]*/- /g' <path/to/yaml/file>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ```bash | |
| # Remove trailing spaces | |
| sed -i 's/\s*$//g' <path/to/yaml/file> | |
| # Remove extra spaces after ": " | |
| sed -i 's/:\s\s*/: /g' <path/to/yaml/file> | |
| # Remove extra spaces after "- " | |
| sed -i 's/-\s\s*/- /g' <path/to/yaml/file> | |
| # Remove empty lines from beginning and end | |
| sed -i -e '/./,$!d' -e :a -e '/^\n*$/{$d;N;ba' -e '}' <path/to/yaml/file> |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@README.md` around lines 149 - 160, Update the three sed substitution patterns
to use POSIX character class [[:space:]] instead of the GNU-only \s (i.e.,
change "s/\s*$//g" to "s/[[:space:]]*$//g", "s/:\s\s*/: /g" to
"s/:[[:space:]][[:space:] ]*/: /g" or more simply "s/:[[:space:]]\{1,\}/: /g",
and "s/-\s\s*/- /g" to "s/-[[:space:]]\{1,\}/- /g") so they work with BSD/POSIX
sed; keep the same quoting and flags as used in the README examples and ensure
the empty-line trimming command remains unchanged.
| 2. Validates chart YAML against the health check schema | ||
| 3. Publishes updated charts to `gh-pages` on merge | ||
|
|
||
| The workflow file lives at `.github/workflows/`. |
There was a problem hiding this comment.
Use official casing: GitHub.
Line 173 should use GitHub (capital H) for consistency and correctness.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~173-~173: The official name of this software platform is spelled with a capital “H”.
Context: ...son merge The workflow file lives at.github/workflows/`. --- ## Contributing 1. ...
(GITHUB)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@README.md` at line 173, Update the README sentence that currently uses "Git
hub" or incorrect casing so it reads "The workflow file lives at
.github/workflows/." with the correct official casing "GitHub" (capital G and
H); locate the sentence in README.md and replace the existing word with "GitHub"
to ensure consistent branding.
The existing README covers only the basics. This PR expands it to help new contributors and operators get started more easily.
Added:
Existing content is fully preserved within the new structure.
Summary by CodeRabbit