Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Powershell and vale linters to cupcake flavor #4481

Closed
wants to merge 3 commits into from

Conversation

bdovaz
Copy link
Collaborator

@bdovaz bdovaz commented Jan 10, 2025

Fixes #4364

@bdovaz
Copy link
Collaborator Author

bdovaz commented Jan 10, 2025

/build

Command run output
Build command workflow started.
Installing dependencies
Running script ./build.sh
Build command workflow completed updating files.

Copy link
Contributor

github-actions bot commented Jan 10, 2025

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Elapsed time
✅ API spectral 1 0 1.79s
⚠️ BASH bash-exec 6 1 0.04s
✅ BASH shellcheck 6 0 0.21s
✅ BASH shfmt 6 0 0 1.01s
✅ COPYPASTE jscpd yes no 3.58s
✅ DOCKERFILE hadolint 129 0 23.92s
✅ JSON jsonlint 20 0 0.25s
✅ JSON v8r 22 0 15.09s
⚠️ MARKDOWN markdownlint 267 0 301 28.17s
✅ MARKDOWN markdown-table-formatter 267 0 0 168.26s
⚠️ PYTHON bandit 214 66 3.02s
✅ PYTHON black 214 0 0 4.99s
✅ PYTHON flake8 214 0 2.22s
✅ PYTHON isort 214 0 0 1.28s
✅ PYTHON mypy 214 0 15.87s
✅ PYTHON pylint 214 0 34.69s
✅ PYTHON ruff 214 0 0 0.49s
✅ REPOSITORY checkov yes no 36.86s
✅ REPOSITORY git_diff yes no 0.72s
⚠️ REPOSITORY grype yes 26 13.17s
✅ REPOSITORY secretlint yes no 10.43s
✅ REPOSITORY trivy yes no 15.12s
✅ REPOSITORY trivy-sbom yes no 0.29s
⚠️ REPOSITORY trufflehog yes 1 54.33s
✅ SPELL cspell 717 0 13.65s
⚠️ SPELL lychee 349 14 5.15s
✅ XML xmllint 3 0 0 0.78s
✅ YAML prettier 160 0 0 5.3s
✅ YAML v8r 102 0 32.46s
✅ YAML yamllint 161 0 2.95s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@echoix
Copy link
Collaborator

echoix commented Jan 10, 2025

What's the size increase with that? We wouldn't want to make the cupcake to be like the full

@bdovaz
Copy link
Collaborator Author

bdovaz commented Jan 10, 2025

What's the size increase with that? We wouldn't want to make the cupcake to be like the full

How can I check it in the most realistic way possible? I have run over the repository:

docker buildx build -f ./flavors/cupcake/Dockerfile . --tag cupcake

But the result does not make sense:

REPOSITORY TAG IMAGE ID CREATED SIZE
cupcake latest 3d504cdb0c86 49 seconds ago 6.1GB

@echoix
Copy link
Collaborator

echoix commented Jan 10, 2025

I think we're at 10 for the full, isn't it that?

@echoix
Copy link
Collaborator

echoix commented Jan 10, 2025

There's the compressed and uncompressed size too

@bdovaz
Copy link
Collaborator Author

bdovaz commented Jan 10, 2025

There's the compressed and uncompressed size too

But how do I see that? With docker images I only see one value

@echoix
Copy link
Collaborator

echoix commented Jan 10, 2025

There's the compressed and uncompressed size too

But how do I see that? With docker images I only see one value

It seems docker images gives uncompressed, and the compressed size can be checked in the registry or other ways https://www.back2code.me/2020/10/docker-images-size/

https://gist.github.com/MichaelSimons/fb588539dcefd9b5fdf45ba04c302db6

@bdovaz
Copy link
Collaborator Author

bdovaz commented Jan 11, 2025

There's the compressed and uncompressed size too

But how do I see that? With docker images I only see one value

It seems docker images gives uncompressed, and the compressed size can be checked in the registry or other ways https://www.back2code.me/2020/10/docker-images-size/

https://gist.github.com/MichaelSimons/fb588539dcefd9b5fdf45ba04c302db6

I have followed these steps:

https://gist.github.com/MichaelSimons/fb588539dcefd9b5fdf45ba04c302db6#local-image

But the result doesn't make sense to me because it says 5.76 GB.

But what makes less sense is that the initial image occupied 6.1 GB. The command I used as I said is this:

docker buildx build -f ./flavors/cupcake/Dockerfile . --tag cupcake

There is something I must be doing wrong.

cc @nvuillam

@nvuillam
Copy link
Member

We can merge this PR, but I think that at some point we'll have to implement some "My Own Flavor" stuff, it has been requested many times by the community... I just don't really know how to do it ^^

@heizi even created a script for that ^^
https://github.com/Heyzi/megalinter_flavor_generator

@bdovaz
Copy link
Collaborator Author

bdovaz commented Jan 17, 2025

@nvuillam I leave this PR in your hands then with whatever you decide.

And yes, I have also thought many times that there should be a mechanism so that everyone can build their own flavor because realistically the combinations are infinite and although there are more common cases, there are other times that you need a combination that you find in a flavor but is missing a couple of linters and just for that you have to use the complete image...

cc @echoix

@nvuillam
Copy link
Member

I prefer not to make cupcake heavier 🥴

But we definitely need something, maybe:

  • generating a base image with just the core ane no linter
  • use mega-linter runner to generate a template repo with a dockerfile based on the the core image
  • add instructions to select the linters for uour custom flavor + how to configure the repo (variables...) to have ready to use images generated via GitHub actions

@bdovaz
Copy link
Collaborator Author

bdovaz commented Jan 17, 2025

I prefer not to make cupcake heavier 🥴

But we definitely need something, maybe:

  • generating a base image with just the core ane no linter
  • use mega-linter runner to generate a template repo with a dockerfile based on the the core image
  • add instructions to select the linters for uour custom flavor + how to configure the repo (variables...) to have ready to use images generated via GitHub actions

Create an issue and collect the information you think is interesting to give it the visibility it deserves.

Thanks.

@nvuillam
Copy link
Member

nvuillam commented Jan 18, 2025

Done :)

#4523

@nvuillam nvuillam closed this Jan 18, 2025
@bdovaz bdovaz deleted the add-cupcake-linters branch January 18, 2025 08:26
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.

Flavor cupcake is missing several linters
3 participants