Cyclomatic complexity measures the number of linearly independent paths through a program's source code.Ĭonstructors of derived classes must call super()ĭisallow unused eslint-disable comments.
Anylogic unused parameters code#
This rule enables linting your code for browser compatibility.ĭetects excess of cyclomatic complexity accodring to settings. Require constructor names to begin with a capital letter Typescript-eslint-restrict-template-expressionsĮnforce template literal expressions to be of string typeĭetect any triple slash reference definitions in the top of the file, they should be replaced by the import style (e.g replace by "import _ as foo from 'foo' ")Įnforces unbound methods are called with their expected scope Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoringĭetect the assignment of a require import to a var such as 'var module = require("module")' as it should be replaced by the ES2015-style or 'import foo = require("module")' imports An unused expression which has no effect on the state of the program indicates a logic error.ĭisallow unused variables. Typescript-eslint-no-unsafe-member-accessĭisallows member access on any typed variables as it creates a potential safety hole, and source of bugs in your codebase.ĭisallow unused expressions. Require explicit return and argument types on exported functions' and classes' public class methodsĮnforces naming conventions for everything across a codebase, in the settings verify if the naming-convention is camelCase, snake_case, etc.ĭetect any empty methods, as in methods that do not have any logicĭetect any explicit "any" type, it should be replaced by another specific valid type (e.g string, number, boolean)ĭetect all non-null assertions as they cancel the benefits of strict null-checking modeĭisallow variable declarations from shadowing variables declared in the outer scopeĭisallows assigning any to variables and properties as it creates a potential safety hole, and source of bugs in your codebase.ĭisallows calling an any type value as it creates a potential safety hole, and source of bugs in your codebase.
Typescript-eslint-explicit-module-boundary-types Specify public or private functions and attributes of your classes. Require explicit accessibility modifiers on class properties and methods. Typescript-eslint-explicit-member-accessibility Typescript-eslint-explicit-function-return-typeĭetect any functions without an explicit return type at the end of all possible expressions, make sure the function always have a reachable return type in all scenarios. Prefer function components to class componentsĭetect any comment as it can reduce the effectiveness of TypeScript overall.ĭetect any types that are banned in the setting, they should be replaced by one of the suggested types instead Split the logic of this function into smaller functions.Ĭodiga-code-inspector-react-no-class-component
UseQuery() must use the following variables as return: loading, data and errorįunction is too long according to settings. UseMutation() must use the following variables as return: loading, data and error.Ĭodiga-code-inspector-apollo-use-query-check-all-arguments For example: void foo(workerid_t workerId) Īs far as I know, MSVC doesn't have an equivalent to _attribute_((_unused_)).Codiga-code-inspector-apollo-use-mutation-check-all-arguments In practice this is accomplished by putting _attribute_ ((unused)) just before the parameter. This attribute, attached to a variable, means that the variable is
In gcc, you can label the parameter with the unused attribute. You can use this macro for all your unused parameters. I usually write a macro like this: #define UNUSED(x) (void)(x)