Showing 5 of 5 total issues
Function provide
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
provide() {
const highlightColour = this._configStore.getExtensionConfig('annotationHighlightColor');
return `
var vscode = acquireVsCodeApi();
var stylesheet = document.styleSheets[0];
AppIntegratorFactory
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
Open
export class AppIntegratorFactory {
private readonly _extensionContext: any;
private _annotateCommand: AnnotateCommand;
private _changedFilePicker: ChangedFilePicker;
private _configStore: ConfigStore;
Function _getFixedStyle
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_getFixedStyle() {
const config = this._configStore;
const fontFamily = config.getEditorConfig('fontFamily');
const fontSize = config.getEditorConfig('fontSize');
const lineHeight = config.getEditorConfig('lineHeight');
Function _parseChangeEntry
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_parseChangeEntry(entry) {
const columns = entry.split('\t');
const changeType = columns[0].charAt(0);
switch (changeType) {
case 'A':
Function _getQueryParams
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
_getQueryParams(uri) {
if (uri.scheme === 'file') {
return {
path: uri.fsPath,
_ts: this._getCurrentDate()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"