Skip to content

Commit f3ec14e

Browse files
committed
[Matlab] Small fixes
- Fix case typo in Section.filterFindSections. - Add style guide link to contributing file.
1 parent 670d29b commit f3ec14e

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

+nix/Section.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@
9797

9898
% maxDepth is handled like an index
9999
function r = findSections(obj, maxDepth)
100-
r = obj.FilterFindSections(maxDepth, nix.Filter.acceptall, '');
100+
r = obj.filterFindSections(maxDepth, nix.Filter.acceptall, '');
101101
end
102102

103103
% maxDepth is handled like an index
104-
function r = FilterFindSections(obj, maxDepth, filter, val)
104+
function r = filterFindSections(obj, maxDepth, filter, val)
105105
r = nix.Utils.find(obj, 'findSections', maxDepth, filter, val, @nix.Section);
106106
end
107107

CONTRIBUTING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Please try to avoid duplicates of issues. If you encounter duplicated issues, pl
4040
one, reference the closed issues in the one that is left open and add missing information from the closed issues
4141
(if necessary) to the remaining issue.
4242

43-
Assign meaningful tags to newly crated issues and if possible assign them to milestones.
43+
Assign meaningful tags to newly crated issues and if possible assign them to a milestone.
4444

4545

4646
Reviewing pull requests
@@ -64,7 +64,8 @@ Testing
6464
Style guide
6565
-----------
6666

67-
Adhere to the MATLAB Style Guidelines 2.0 as suggested by Richard Johnson.
67+
Adhere to the [MATLAB Style Guidelines 2.0](https://de.mathworks.com/matlabcentral/fileexchange/46056-matlab-style-guidelines-2-0)
68+
as suggested by Richard Johnson.
6869

6970
Furthermore, adhere to these additional guidelines for the nix-mx project:
7071
- Keep line length at a maximum of 90 characters.

tests/TestSection.m

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -796,46 +796,46 @@
796796
side1 = side.createSection(sideName, 'nixSection');
797797

798798
% test find by id
799-
filtered = sl1.FilterFindSections(1, nix.Filter.id, sl41.id);
799+
filtered = sl1.filterFindSections(1, nix.Filter.id, sl41.id);
800800
assert(isempty(filtered));
801-
filtered = sl1.FilterFindSections(4, nix.Filter.id, sl41.id);
801+
filtered = sl1.filterFindSections(4, nix.Filter.id, sl41.id);
802802
assert(size(filtered, 1) == 1);
803803
assert(strcmp(filtered{1}.id, sl41.id));
804804

805805
% test find by ids
806806
filterids = {sl1.id, sl41.id};
807-
filtered = sl1.FilterFindSections(1, nix.Filter.ids, filterids);
807+
filtered = sl1.filterFindSections(1, nix.Filter.ids, filterids);
808808
assert(size(filtered, 1) == 1);
809-
filtered = sl1.FilterFindSections(4, nix.Filter.ids, filterids);
809+
filtered = sl1.filterFindSections(4, nix.Filter.ids, filterids);
810810
assert(size(filtered, 1) == 2);
811811

812812
% test find by name
813-
filtered = sl1.FilterFindSections(5, nix.Filter.name, sideName);
813+
filtered = sl1.filterFindSections(5, nix.Filter.name, sideName);
814814
assert(isempty(filtered));
815-
filtered = sl1.FilterFindSections(1, nix.Filter.name, sl41.name);
815+
filtered = sl1.filterFindSections(1, nix.Filter.name, sl41.name);
816816
assert(isempty(filtered));
817-
filtered = sl1.FilterFindSections(4, nix.Filter.name, sl41.name);
817+
filtered = sl1.filterFindSections(4, nix.Filter.name, sl41.name);
818818
assert(size(filtered, 1) == 1);
819819
assert(strcmp(filtered{1}.name, sl41.name));
820820

821821
% test find by type
822-
filtered = sl1.FilterFindSections(1, nix.Filter.type, findSection);
822+
filtered = sl1.filterFindSections(1, nix.Filter.type, findSection);
823823
assert(isempty(filtered));
824-
filtered = sl1.FilterFindSections(4, nix.Filter.type, findSection);
824+
filtered = sl1.filterFindSections(4, nix.Filter.type, findSection);
825825
assert(size(filtered, 1) == 3);
826826
assert(strcmp(filtered{1}.type, findSection));
827827

828828
% test fail on nix.Filter.metadata
829829
err = 'unknown or unsupported filter';
830830
try
831-
sl1.FilterFindSections(1, nix.Filter.metadata, 'metadata');
831+
sl1.filterFindSections(1, nix.Filter.metadata, 'metadata');
832832
catch ME
833833
assert(strcmp(ME.message, err));
834834
end
835835

836836
% test fail on nix.Filter.source
837837
try
838-
sl1.FilterFindSections(1, nix.Filter.source, 'source');
838+
sl1.filterFindSections(1, nix.Filter.source, 'source');
839839
catch ME
840840
assert(strcmp(ME.message, err));
841841
end

0 commit comments

Comments
 (0)