Description
Per CONTRIBUTING.md, lines should be kept below 100 characters. The codebase has approximately 51 code lines exceeding this limit (excluding ASCII art and help text which are acceptable exceptions).
Scope
Lines over 100 characters fall into these categories:
High-priority (complex code)
- Lines 2800-2801: Complex awk command for media player parsing (~150 chars)
- Various parameter expansion chains for distro detection
Medium-priority (could be split)
- Long conditional statements
- String assignments with multiple fallbacks
Acceptable exceptions (no action needed)
- ASCII art (Unicode logos like Tux variants)
- Help text listing supported distros
- Comments
Example refactors
Before (line 2800-2801):
awk -F '"' 'BEGIN {RS=" entry"}; /"xesam:artist"/ {a = $4} /"xesam:album"/ {split($0,b,"\""); for(i=5;i<length(b);i++)b[4]=b[4] "\"" b[i]}
/"xesam:title"/ {split($0,t,"\""); for(i=5;i<length(t);i++)t[4]=t[4] "\"" t[i]} END {print a " \n" b[4] " \n" t[4]}'
After (split with backslash continuation):
awk -F '"' 'BEGIN {RS=" entry"};
/"xesam:artist"/ {a = $4}
/"xesam:album"/ {split($0,b,"\""); for(i=5;i<length(b);i++)b[4]=b[4] "\"" b[i]}
/"xesam:title"/ {split($0,t,"\""); for(i=5;i<length(t);i++)t[4]=t[4] "\"" t[i]}
END {print a " \n" b[4] " \n" t[4]}'
Audit command
Find violations:
awk 'length > 100 {print NR": "length" chars"}' neofetch | grep -v ASCII
References
Description
Per CONTRIBUTING.md, lines should be kept below 100 characters. The codebase has approximately 51 code lines exceeding this limit (excluding ASCII art and help text which are acceptable exceptions).
Scope
Lines over 100 characters fall into these categories:
High-priority (complex code)
Medium-priority (could be split)
Acceptable exceptions (no action needed)
Example refactors
Before (line 2800-2801):
After (split with backslash continuation):
Audit command
Find violations:
References