armbian-kernel: improve code documentation and formatting#9559
armbian-kernel: improve code documentation and formatting#9559igorpecovnik wants to merge 1 commit intomainfrom
Conversation
- Add comprehensive function documentation for kernel config hooks - Add inline comments for all kernel configuration options - Align all inline comments to column 55 for consistency - Remove excessive blank lines between options - Split multi-option lines for better readability Signed-off-by: Igor Pecovnik <igor@armbian.com>
📝 WalkthroughWalkthroughUpdated inline documentation and formatting across kernel configuration hook functions in the Armbian kernel compilation module. Added kernel-context explanations and restructured comment blocks. Adjusted spacing in option array insertions and clarified two-phase flow comments in a utility function. No logic changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
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.
🧹 Nitpick comments (2)
lib/functions/compilation/armbian-kernel.sh (2)
69-69: Minor typo in comment.The comment uses "lets" but should be "let's" (contraction of "let us").
📝 Suggested fix
- opts_y+=("EXPERT") # Too many config options are hidden behind EXPERT=y, lets have it always on + opts_y+=("EXPERT") # Too many config options are hidden behind EXPERT=y, let's have it always on🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lib/functions/compilation/armbian-kernel.sh` at line 69, The comment on the opts_y+=("EXPERT") line contains a typo: change "lets" to the contraction "let's" so the comment reads "Too many config options are hidden behind EXPERT=y, let's have it always on"; update the comment next to the EXPERT option to use "let's" (reference: opts_y+=("EXPERT")).
120-120: Minor typo in comment.The contraction "doesnt'" should be "doesn't" (apostrophe replaces the missing 'o').
📝 Suggested fix
- # We don't disable the eBPF options, as eBPF itself doesn't require BTF (debug info) and doesnt' consume as much memory during build as BTF debug info does. + # We don't disable the eBPF options, as eBPF itself doesn't require BTF (debug info) and doesn't consume as much memory during build as BTF debug info does.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lib/functions/compilation/armbian-kernel.sh` at line 120, Fix the minor typo in the comment inside armbian-kernel.sh: change "doesnt'" to the correct contraction "doesn't" in the comment that reads "We don't disable the eBPF options, as eBPF itself doesn't require BTF (debug info) and doesnt' consume as much memory during build as BTF debug info does." to ensure proper spelling and punctuation.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@lib/functions/compilation/armbian-kernel.sh`:
- Line 69: The comment on the opts_y+=("EXPERT") line contains a typo: change
"lets" to the contraction "let's" so the comment reads "Too many config options
are hidden behind EXPERT=y, let's have it always on"; update the comment next to
the EXPERT option to use "let's" (reference: opts_y+=("EXPERT")).
- Line 120: Fix the minor typo in the comment inside armbian-kernel.sh: change
"doesnt'" to the correct contraction "doesn't" in the comment that reads "We
don't disable the eBPF options, as eBPF itself doesn't require BTF (debug info)
and doesnt' consume as much memory during build as BTF debug info does." to
ensure proper spelling and punctuation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ddf4c280-36d9-4c7f-9425-b015902098f9
📒 Files selected for processing (1)
lib/functions/compilation/armbian-kernel.sh
Summary
This PR improves the code documentation and formatting of the kernel configuration file
lib/functions/compilation/armbian-kernel.sh.Changes
File:
lib/functions/compilation/armbian-kernel.shEnhanced documentation for functions like:
armbian_kernel_config__extrawifi_enable_wifi_opts_80211armbian_kernel_config__enable_zram_supportarmbian_kernel_config__select_nftablesarmbian_kernel_config__enable_docker_supportAdded descriptive inline comments for every kernel config option
All comments aligned to column 55 (using tab width = 4)
File reduced from 1030 to 726 lines by removing excessive spacing
Test plan
Summary by CodeRabbit