Enforcing naming conventions with a custom codeAnalyzerConfiguration.json
Mostra commenti meno recenti
I'm using R2024b (24.2.0.2863752 (R2024b) Update 5), and I'm trying to implement the enforcement of naming conventions for methods, functions, etc. in my code base, so I've been referencing the configuring the code analyzer help page. I've just tried using the sample configuration as-is, and it appears that the code analyzer is not picking up on names which are non-compliant. See here this snippet for my class timeDomainSimulation.m:
classdef timeDomainSimulation
properties
model (1,1) cochlearModel
noiseStrength (1,1) double {mustBeNonnegative}
timeParams (1,1) timeDomainSimulationParameters
spectrum (1,1) welchSpectrum
end
end
I'm not entirely sure what's going on - when I used the matlab.codeanalysis.validateConfiguration function, it seemed to indicate that the "naming" field was invalid, but in all the documentation, it seems that this is what the name of the field is. I also tried changing the severity of "NOANS" and that seemed to work. I'm not sure if this a bug or if I'm just misunderstanding something
Thanks,
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Structures in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!