-
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
1c09744
Add initial version of miss_hit
mvanzulli cf9dc9d
Clean make
mvanzulli 9597737
Format check (#677)
mvanzulli 61c4f33
Update m2md.m
mvanzulli 29f3d9f
apply copyright and add install instructions
jorgepz 0de7190
fix deploy
jorgepz 34f2669
fix deployment
jorgepz 4307608
final fix
jorgepz 243d724
Merge pull request #744 from ONSAS/patch-miss-hit
mvanzulli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,34 @@ | ||
# Style guide configuration for MISS_HIT | ||
# Reference: https://florianschanda.github.io/miss_hit/style_checker.html | ||
|
||
# Format check parameters: | ||
# Maximum allowed length for a single line of code (in characters) | ||
# Helps maintain code readability without unnecessary horizontal scrolling. | ||
line_length: 200 | ||
|
||
# Number of spaces a single tab corresponds to | ||
# Ensures consistent indentation throughout the codebase. | ||
tab_width: 2 | ||
|
||
# Regular expression for function names | ||
# Enforces CamelCase naming convention: each word starts with an uppercase letter, no underscores. | ||
regex_function_name: "[A-Z][a-zA-Z0-9]*" | ||
|
||
# Regular expression for script file names | ||
# Enforces CamelCase naming convention for file names: no spaces, starts with an uppercase letter. | ||
regex_script_name: "[A-Z][a-zA-Z0-9]*" | ||
|
||
# Regular expression for parameter (variable) names | ||
# Enforces snake_case naming for function parameters (unchanged for clarity and consistency). | ||
regex_parameter_name: "[a-zA-Z]+(_[a-zA-Z]+)*" | ||
|
||
# Copyright owner entity | ||
# Adds a copyright notice with the specified entity name. | ||
copyright_entity: "ONSAS" | ||
|
||
# Metrics for code quality | ||
|
||
# "cnest" (Control Nesting Depth): Maximum allowed nesting level of control structures (e.g., loops, conditionals) | ||
# Helps reduce code complexity and improve maintainability. | ||
metric "cnest": limit 6 | ||
|
||
# "file_length": Maximum allowed number of lines in a single file | ||
# Keeps files manageable and easier to navigate. | ||
metric "file_length": limit 1000 | ||
|
||
# "cyc" (Cyclomatic Complexity): Maximum allowed complexity of a single function | ||
# A lower value ensures that functions remain simple and focused. | ||
metric "cyc": limit 35 | ||
|
||
# "parameters": Maximum allowed number of parameters for a single function | ||
# Encourages simpler function signatures and improves readability. | ||
metric "parameters": limit 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,101 @@ | ||
% function for testing ONSAS using moxunit | ||
% ---------------------------------------- | ||
function test_suite=runTestProblems_moxunit_disp | ||
function test_suite = runTestProblems_moxunit_disp | ||
% initialize tests | ||
try | ||
test_functions=localfunctions() | ||
test_functions = localfunctions(); | ||
catch | ||
end | ||
|
||
% set auxiliar environment variable | ||
setenv('TESTS_RUN', 'yes') | ||
setenv('TESTS_RUN', 'yes'); | ||
|
||
% initialize the MOxUnit test suite | ||
initTestSuite; | ||
|
||
function test_1 | ||
beamLinearVibration | ||
assertEqual( verifBoolean, true ); | ||
beamLinearVibration; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_2 | ||
cantileverModalAnalysis | ||
assertEqual( verifBoolean, true ); | ||
cantileverModalAnalysis; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_3 | ||
cantileverSelfWeight | ||
assertEqual( verifBoolean, true ); | ||
cantileverSelfWeight; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_4 | ||
dragBeamReconfiguration | ||
assertEqual( verifBoolean, true ); | ||
dragBeamReconfiguration; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_5 | ||
eulerColumn | ||
assertEqual( verifBoolean, true ); | ||
eulerColumn; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_6 | ||
frameLinearAnalysis | ||
assertEqual( verifBoolean, true ); | ||
frameLinearAnalysis; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_7 | ||
linearAerodynamics | ||
assertEqual( verifBoolean, true ); | ||
linearAerodynamics; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_8 | ||
ringPlaneStrain | ||
assertEqual( verifBoolean, true ); | ||
ringPlaneStrain; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_9 | ||
nonLinearPendulum | ||
assertEqual( verifBoolean, true ); | ||
nonLinearPendulum; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_10 | ||
springMass | ||
assertEqual( verifBoolean, true ); | ||
springMass; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_11 | ||
simplePropeller | ||
assertEqual( verifBoolean, true ); | ||
simplePropeller; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_12 | ||
staticVonMisesTruss | ||
assertEqual( verifBoolean, true ); | ||
staticVonMisesTruss; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_13 | ||
uniaxialCompression | ||
assertEqual( verifBoolean, true ); | ||
uniaxialCompression; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_14 | ||
uniaxialExtension | ||
assertEqual( verifBoolean, true); | ||
uniaxialExtension; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_15 | ||
uniformCurvatureCantilever | ||
assertEqual( verifBoolean, true); | ||
function test_15 | ||
uniformCurvatureCantilever; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_16 | ||
VIVCantilever | ||
assertEqual( verifBoolean, true ); | ||
VIVCantilever; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_17 | ||
beamTrussJoint | ||
assertEqual( verifBoolean, true ); | ||
beamTrussJoint; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_18 | ||
staticPlasticVonMisesTruss | ||
assertEqual( verifBoolean, true ); | ||
staticPlasticVonMisesTruss; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_19 | ||
platePatchTest | ||
assertEqual( verifBoolean, true ); | ||
platePatchTest; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_20 | ||
cantileverPlate | ||
assertEqual( verifBoolean, true ); | ||
cantileverPlate; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_21 | ||
addedMassPendulum | ||
assertEqual( verifBoolean, true ); | ||
addedMassPendulum; | ||
assertEqual(verifBoolean, true); | ||
|
||
function test_22 | ||
assertEqual( gaussIntegrationTest, true); | ||
assertEqual(gaussIntegrationTest, true); | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.