mirror of
https://github.com/flipperdevices/flipperzero-firmware.git
synced 2025-12-12 04:41:26 +04:00
Images linting: ensure that all images conform specification (#3802)
* Change all icons to be white background * assets: re-processed all *.png images to 1-bit * assets: also stripped profile data from .pngs * assets: also stripped datetime from metadata (`-define png:exclude-chunks=date,time`) * scripts: added image linter and formatter; fbt: added `lint_img` && `format_img` targets; github: integrated image lint step into CI * scripts: imglint: fixed deprecation warning * images: applied `format_img` * fbt: added `lint_all` and `format_all` targets; docs: updated for new targets Co-authored-by: hedger <hedger@nanode.su> Co-authored-by: hedger <hedger@users.noreply.github.com>
This commit is contained in:
16
.github/workflows/lint_and_submodule_check.yml
vendored
16
.github/workflows/lint_and_submodule_check.yml
vendored
@@ -95,6 +95,22 @@ jobs:
|
||||
echo "C Lint: all good ✨" >> $GITHUB_STEP_SUMMARY;
|
||||
fi
|
||||
|
||||
- name: 'Check image assets'
|
||||
if: always()
|
||||
run: |
|
||||
set +e;
|
||||
./fbt -s lint_img 2>&1 | tee lint-assets.log;
|
||||
if [ "${PIPESTATUS[0]}" -ne 0 ]; then
|
||||
# Save multiline output
|
||||
echo "errors=1" >> $GITHUB_OUTPUT;
|
||||
printf "Image Lint errors:\n\`\`\`\n" >> $GITHUB_STEP_SUMMARY;
|
||||
echo "$(cat lint-assets.log)" >> $GITHUB_STEP_SUMMARY;
|
||||
printf "\n\`\`\`\n" >> $GITHUB_STEP_SUMMARY;
|
||||
exit 1;
|
||||
else
|
||||
echo "Image Lint: all good ✨" >> $GITHUB_STEP_SUMMARY;
|
||||
fi
|
||||
|
||||
- name: Report code formatting errors
|
||||
if: ( steps.syntax_check_py.outputs.errors || steps.syntax_check_cpp.outputs.errors ) && github.event.pull_request
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user