introducing own .pre-commit-config.yaml for OPM-common #4791
Conversation
|
jenkins build this please |
| f = open("opm/material/densead/EvaluationSpecializations.hpp", "w") | ||
| f.write(fileContents) | ||
| f.close() | ||
| # adding a newline at the end of the file if not present |
There was a problem hiding this comment.
not totally sure why this is needed only for the file EvaluationSpecializations.hpp, while not other generated files.
There was a problem hiding this comment.
not totally sure why this is needed only for the file
EvaluationSpecializations.hpp, while not other generated files.
I don't know either. Someone more familiar with the templating system will have to give a more definitive answer.
|
jenkins build this please |
bb00eba to
230aaf1
Compare
|
test_ERsm.cpp is using lines with pure white spaces and was difficult (for me) to fix the test after removing the white spaces. So test_ERsm.cpp is removed from the pre-commit whitespaces checking list . now I see the comment line |
|
jenkins build this please |
|
Now the jenkins passed. https://ci.opm-project.org/job/opm-common-PR-builder/8952/ I need to split the last commit, just posting the build link for reference. |
for white space removal for now. The tests utilizing lines with pure whitespaces and difficult to fix.
since \n was added at the beginning of the messages, so it will not generate the first line in the message with a white space.
230aaf1 to
53e4dcb
Compare
|
jenkins build this please |
bska
left a comment
There was a problem hiding this comment.
Thanks a lot for the updates. I think this looks good now. I don't quite understand why we need a mostly full copy of the NORNE_ATW2013 simulation model in our Python tree, but I'm not going to debate that here. That's for someone else to pick up later.
As for the whitespace changes to EvaluationSpecializations.hpp that escapes me too. Anyone want to chime in?
| // \n is added at the beginning of the messages through locationStringLine() | ||
| return fmt::format(R"(Problem with keywords{} |
There was a problem hiding this comment.
Fair enough. This could possibly be phrased more succinctly using fmt::join(), but I'm not going to go through that exercise now.
| f = open("opm/material/densead/EvaluationSpecializations.hpp", "w") | ||
| f.write(fileContents) | ||
| f.close() | ||
| # adding a newline at the end of the file if not present |
There was a problem hiding this comment.
not totally sure why this is needed only for the file
EvaluationSpecializations.hpp, while not other generated files.
I don't know either. Someone more familiar with the templating system will have to give a more definitive answer.
|
Thanks for the approval. I am getting it in now. |
And run pre-commit run --all-files to remove the white spaces and fixing the EOL at the end of all the files.
As discussed in #4790 ,
externalfolder is excluded.There will be a few commits to fix the failures, mostly due to string processing and usage of strings.