-
Notifications
You must be signed in to change notification settings - Fork 18
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 initial version of miss_hit #741
Conversation
# Reference: https://florianschanda.github.io/miss_hit/style_checker.html | ||
|
||
# Maximum allowed length for a single line of code (in characters) | ||
# Helps maintain code readability without unnecessary horizontal scrolling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably here we want to align on what is going to be the convention as in the current version is still erroring:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking code formatting in ./../docs/ ./../test/...
poetry run mh_style ./../docs/ ./../test/
In ../docs/src/bringONSASmFilesToONSASdocs.m, line 1
| % md function used to conver .m files in the ONSAS repo to .md files in this repo
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ style: No copyright notice found in docstring [copyright_notice]
In ../docs/src/bringONSASmFilesToONSASdocs.m, line 6
| function bringONSASmFilesToONSASdocs
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ style: violates naming scheme for function [naming_functions]
In ../docs/src/m2md.m, line 1
| function m2md(fileIn, fileOut, includeCodeBoolean, iniLine)
| ^^^^ style: violates naming scheme for function [naming_functions]
In ../docs/src/m2md.m, line 1
| function m2md(fileIn, fileOut, includeCodeBoolean, iniLine)
| ^^^^ style: Could not find any copyright notice [copyright_notice]
In ../test/gaussIntegrationTest.m, line 1
| % ========================================================================================
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ style: No copyright notice found in docstring [copyright_notice]
In ../test/gaussIntegrationTest.m, line 4
| function resultBoolean = gaussIntegrationTest()
| ^^^^^^^^^^^^^^^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/gaussIntegrationTest.m, line 56
| function ys = test_fun_to_integrate(xinput)
| ^^^^^^^^^^^^^^^^^^^^^ style: violates naming scheme for function [naming_functions]
../test/runTestProblems_local.m: style: violates naming scheme for scripts [naming_scripts]
In ../test/runTestProblems_moxunit_disp.m, line 1
| % function for testing ONSAS using moxunit
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ style: No copyright notice found in docstring [copyright_notice]
In ../test/runTestProblems_moxunit_disp.m, line 3
| function test_suite = runTestProblems_moxunit_disp
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 16
| function test_1
| ^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 20
| function test_2
| ^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 24
| function test_3
| ^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 28
| function test_4
| ^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 32
| function test_5
| ^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 36
| function test_6
| ^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 40
| function test_7
| ^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 44
| function test_8
| ^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 48
| function test_9
| ^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 52
| function test_10
| ^^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 56
| function test_11
| ^^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 60
| function test_12
| ^^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 64
| function test_13
| ^^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 68
| function test_14
| ^^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 72
| function test_15
| ^^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 76
| function test_16
| ^^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 80
| function test_17
| ^^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 84
| function test_18
| ^^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 88
| function test_19
| ^^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 92
| function test_20
| ^^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 96
| function test_21
| ^^^^^^^ style: violates naming scheme for function [naming_functions]
In ../test/runTestProblems_moxunit_disp.m, line 100
| function test_22
| ^^^^^^^ style: violates naming scheme for function [naming_functions]
MISS_HIT Style Summary: 5 file(s) analysed, 32 style issue(s)
make: *** [Makefile:26: format_check] Error 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, however this could be solved in another PR? maybe this pr adds miss_hit and in another we define the format... and in another we add this to the CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, we can do that. Merge the machinery and then we can decide, I was thinking the automation of pre-commit can be added in a different PR after we clean all formats issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried to describe the plan #677 (comment), feel free to edit or modify as you consider the best to do a safe and sound auto formatting migration.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #741 +/- ##
==========================================
- Coverage 89.65% 89.46% -0.19%
==========================================
Files 131 131
Lines 4649 4661 +12
==========================================
+ Hits 4168 4170 +2
- Misses 481 491 +10 ☔ View full report in Codecov by Sentry. |
Thanks for the PR @mvanzulli ! This is a very nice improvement for the project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deployment of the docs is not working since the length of the %md string changed
Co-authored-by: Jorge Pérez Zerpa <[email protected]>
Good point I found that, proably we will need to support both or strip spaces while we do the migration. However I see http://www.onsas.org/previews/PR741/ is deployed correctly in this PR and why the tests are passing ? |
Following: #677 (comment) I added an initial local version of the formatter so we can start slowly disucssion conventions as well as set up details