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

[FIX] Exclude frozen.yaml from pre-commit because it is generated automatically #97

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

florian-dacosta
Copy link
Member

If we delete it and re-create it, it is full of unwanted diff because of pre-commit reformat

@bealdav @Kev-Roche @sebastienbeau @hparfr

…omatically

If  we delete it and re-create it, it is full of unwanted diff because of pre-commit reformat
@bealdav
Copy link
Member

bealdav commented Oct 17, 2023

Thnaks a lot

@hparfr
Copy link
Member

hparfr commented Oct 17, 2023

is it may be better to only include local-src ?

@sebastienbeau

@florian-dacosta
Copy link
Member Author

is it may be better to only include local-src ?

@sebastienbeau

It makes sense for me. (If we still can exclude some stuff inside local-src)

@hparfr
Copy link
Member

hparfr commented Oct 17, 2023

It makes sense for me. (If we still can exclude some stuff inside local-src)

can you give me some examples ?

hparfr

This comment was marked as duplicate.

@hparfr hparfr self-requested a review October 17, 2023 15:19
Copy link
Member

@hparfr hparfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need also to update this file: update_oca_file.py

@florian-dacosta
Copy link
Member Author

It makes sense for me. (If we still can exclude some stuff inside local-src)

can you give me some examples ?

Well, I am not sure, but I think I had problem already, for instance with CSV files used for some tests in any module.
If a module import a csv file from an external source, I may want to store an example to play some unitests and I don't want it to be reformated

Another one, but quite more specific... for an anonymous customer in v16, they have terrible printers and the native barcode generator from Odoo does not work well for them, I have a big javascript copy pasted that generates barcode in a module.
=> Maybe it could be reformated with no issue but I prefer not even touch it...

Also, in the current exclude, there is stuff from local-src (.html, cassettes, README, etc) so I guess we'll still want to exclude all this if we include only local-src. (I just want to be sure both are compatible (exclude and include)

@florian-dacosta
Copy link
Member Author

you need also to update this file: update_oca_file.py

Not sure how/what I should update

@hparfr
Copy link
Member

hparfr commented Oct 17, 2023

These pre-commit files are derived from oca, so instead of patching the result of the script, you can patch in update_oca_file

your example makes sense. I guess, we want to put the exclusion closer to its place (ie: next to local-src/some_modules/data/copypastedfile )

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.

4 participants