The Embold “Cheat Sheet” for Java, JavaScript, Typescript, C#, Python & C++

While all information about the checks and features offered by Embold is available on our comprehensive docs portal, to make things easier for you, we have created this “cheat sheet.” Here you can find what checks, features, and functionality are available for your language within Embold. Here’s a look at some of the features that we offer and the parameters across which we operate, specifically in the context of these languages.

Overview – In this section, we take a look at a few important parameters and the features offered within each. This includes the number of code issues that Embold can detect within each language, the number of metrics across which these issues can be detected, and whether or not detection of duplicate code is available for each specific language.   Java JavaScript Typescript C# Python C++ Number of Code Issues 731 392 163 48 371 648 Number of Metrics 18 18 18 18 3 18 Duplicate Code ✓ ✓ ✓ ✓ ✓ ✓

Visit the FAQ page in our documents portal for more details

Supported Versions – Compatibility is always a major concern. If you are writing your program in a version that doesn’t work with Embold, you will not be able to check your code. So here’s a list of the versions supported by Embold for each of these languages.   Java JavaScript Typescript C# Python C++ Supported  Versions – ES5, ES6 2.0 – 3.0 .Net FW 2.0 – 7.0, .Net Core 1.0 3.0 98, 14, 11 Code Issues – Embold divides the code issues it detects across up to five parameters based on the seriousness and severity of the issue. In this section, we take a closer look at some of the code issues across these parameters and cite some examples to give you an idea of the type of issues you can expect Embold to pick up on.   Java JavaScript Typescript C# Python C++ Critical
Issues Compile Regex Once
Resource Leak
Complex Regex Pattern badConstructor
invalidRegularExpression cyclomatic-complexity ban-types encoding ArithmeticExpressionsMustDeclarePrecedence AvoidExceptionsInsideStaticConstructors ConditionalExpressionsMustDeclarePrecedence E1004-missingArgumentToSuperMethod F0001-analysisError W0122-useOfExec core.DivideZero cplusplus.NewDelete optin.cplusplus.VirtualCall High
Issues Security Sensitive Regex
Use Of System.out.println
Sensitive Info Logged attemptToOverideConstant notAFunction unclosedComment no-internal-module use-isnan file-header AllocationOfReferenceTypeEnumerator ArrayAllocationForParamsParameter DisposablesShouldCallSuppressFinalize E0102-alreadyDefinedLine E0202-hiddenMethod E0501-noEncodingSpecified alpha.clone.CloneChecker alpha.core.CastSize alpha.core.FixedAddr Medium
Issues Preserve Stack Trace In Logs
Return Empty Array Or Collection Instead Of Null
Unusual REST Practice avoidArguments duplicateKey badForInVariable no-console arrow-return-shorthand typeof-compare CatchBlocksShouldRethrow CompilerWarningLevelIsSetTooLow DisposeFieldsProperly E0011-unrecognizedFileOption E0101-avoidReturnInInitMethod E0110-instantiationError alpha.valist.CopyToSelf deadcode.DeadStores osx.API Low
Issues Log Level Info In Catch Block
Non Thread Safe Field
Declaration badEscapementOfEol alreadyDefined betterWrittenInDotNotation import-spacing max-line-length new-parens AccessModifierMustBeDeclared CallExtensionMethodAsExtension ChangeForExpressionValue E0001-syntaxErrorForModule R0801-duplicateLinesInFiles W0105-stringStatementHasNotEffect debug.AnalysisOrder debug.DumpCalls debug.DumpCFG Info
Issues String Concatenation In Logging
Tightly Coupled Class – – – – –

These are just a few examples, our Code Issues page in our documents portal has the entire list of issues available

Anti-patterns – Anti-patterns are tricky pieces of code that appear to be legitimate but function in a counterintuitive fashion, making them extremely difficult to detect without a dedicated analyzer. The following table looks are the most prominent examples of anti-patterns and Embold’s ability to detect them for each language. Anti-patterns Java JavaScript Typescript C# Python C++ God Class ✓   ✓ ✓   ✓ Shotgun Surgery ✓   ✓ ✓   ✓ Dispersed Coupling ✓   ✓ ✓   ✓ Global Variable         ✓ ✓ Monster File   ✓     ✓   Nested Function   ✓

Continue reading

This post was originally published on this site