Skip to content

Commit dd84d58

Browse files
Merge pull request #214 from gibbonCode/code-issues-action
CodeIssuesTask action
2 parents 8cfd98a + 8feebef commit dd84d58

4 files changed

Lines changed: 37 additions & 2 deletions

File tree

.github/workflows/run_tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ jobs:
4141
with:
4242
command: installGibbon
4343

44+
- name: Check Code-Issues
45+
uses: matlab-actions/run-build@v3
46+
4447
- name: Run tests
4548
uses: matlab-actions/run-tests@v3
4649
with:
@@ -56,4 +59,4 @@ jobs:
5659
files: ./code-coverage/coverage.xml
5760
flags: matlab
5861
token: ${{ secrets.CODECOV_TOKEN }}
59-
fail_ci_if_error: false
62+
fail_ci_if_error: false

buildfile.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
function plan = buildfile
2+
import matlab.buildtool.tasks.*
3+
4+
plan = buildplan(localfunctions);
5+
6+
fc = matlab.buildtool.io.FileCollection.fromPaths(["docs/*.m", "lib/*.m", "tests/*.m"]);
7+
plan("check") = CodeIssuesTask(fc);
8+
plan.DefaultTasks = "check";
9+
end

docs/DEMO_febio_0059_face_mask_loading.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@
536536

537537
[Fr1,Vr1]=roundMesh(indStart_Vm,Vm,Nm,nRim,maskRimFilletRadius);
538538
[Fr2,Vr2]=roundMesh(indEnd_Vm,Vm,Nm,nRim,maskRimFilletRadius);
539-
indEnd_Vr1=size(Vr1)-numPointsRimCurve+1:1:size(Vr1);
539+
indEnd_Vr1=size(Vr1,1) - numPointsRimCurve + 1:size(Vr1,1);
540540
indEnd_Vr2=fliplr(indEnd_Vr1);
541541
[Fr1,Vr1]=quad2tri(Fr1,Vr1,'a');
542542
[Fr2,Vr2]=quad2tri(Fr2,Vr2,'a');
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// https://uk.mathworks.com/help/matlab/matlab_env/configure-code-analyzer.html
2+
// https://uk.mathworks.com/help/matlab/matlab_env/index-of-code-analyzer-checks.html
3+
{
4+
"name": "GIBBON Guideline",
5+
"guidelineVersion": "0.0.0",
6+
"baseConfiguration": "factory",
7+
8+
"checks": {
9+
"JAVFM": {
10+
// JavaFrame was undocummented and has been removed
11+
"severity": "warning"
12+
},
13+
"DisallowFindJObj": {
14+
"rule": {
15+
"template": "functionCall",
16+
"functionNames": "findjobj"
17+
},
18+
"severity": "warning",
19+
"messageText": "findjobj relies on JavaFrame, removed in R2025a",
20+
"enabled": true
21+
}
22+
},
23+
}

0 commit comments

Comments
 (0)