Showing 1,395 of 1,395 total issues
Function getCheckedState
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
private static getCheckedState(
role: string,
users: CfUser[],
existingRoles: CfUserRolesSelected,
newRoles: IUserPermissionInOrg,
- 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"
Further reading
Function scan
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
public scan(packageJson: any) {
this.pkgReadMap = new Map<string, PackageInfo>();
if (packageJson.peerDependencies) {
Object.keys(packageJson.peerDependencies).forEach(dep => {
- 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"
Further reading
Function ngOnInit
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
ngOnInit() {
this.sourceType$ = combineLatest(
this.appDeploySourceTypes.getAutoSelectedType(this.route),
this.store.select(selectSourceType),
this.appDeploySourceTypes.types$.pipe(first(), map(st => st[this.INITIAL_SOURCE_TYPE]))
- 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"
Further reading
Function setQParam
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
protected setQParam(setQ: QParam, qs: QParam[]): boolean {
const existing = qs.find((q: QParam) => q.key === setQ.key);
let changed = true;
if (setQ.value && setQ.value.length) {
if (existing) {
- 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"
Further reading
Function applyDefaultExcludes
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
private applyDefaultExcludes() {
const defaultExcludedPackages = ['@example/theme', '@example/extensions', '@stratosui/desktop-extensions'];
if (this.stratosConfig && this.stratosConfig.packages && this.stratosConfig.packages.desktop) {
defaultExcludedPackages.pop();
this.log('Building with desktop package');
- 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"
Further reading
Function ngOnInit
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
ngOnInit() {
const chartConfigBuilder = getMetricsChartConfigBuilder<IMetricApplication>(
result => {
const metric = result.metric;
if (!!metric.pod && !!metric.namespace) {
- 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"
Further reading
Function compareCharts
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
private compareCharts(a: ChartMetadata, b: ChartMetadata): number {
// Basic properties must be the same
if (a.name !== b.name) {
return -1;
}
- 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"
Further reading
Function init
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
private init() {
// Observabled for loading schema and values for the Chart
const schema$ = this.httpClient.get(this.schemaUrl).pipe(catchError(e => of(null)));
const values$: Observable<string> = this.httpClient.get(this.valuesUrl, { responseType: 'text' }).pipe(
catchError(e => of(null))
- 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"
Further reading
Function getDateFromStoreMetric
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
public getDateFromStoreMetric(metrics: IMetrics, times = this.times): StoreMetricTimeRange {
if (metrics) {
if (metrics.windowValue) {
return {
timeRange: times.find(time => time.value === metrics.windowValue)
- 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"
Further reading
Function constructor
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
constructor(
public pageHeaderService: PageHeaderService,
private store: Store<DashboardOnlyAppState>,
private breakpointObserver: BreakpointObserver,
private router: Router,
- 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"
Further reading
Function ngOnInit
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
ngOnInit() {
const check$ = this.checkLayout.asObservable().pipe(filter(v => v));
const scroll$ = this.scrollDispatcher.scrolled().pipe(map((e: any) => {
const el = e.elementRef.nativeElement;
return el.scrollTop;
- 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"
Further reading
Function selectAllFilteredRows
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
selectAllFilteredRows() {
this.selectAllChecked = !this.selectAllChecked;
const updatedAllRows$ = this.page$.pipe(switchMap((filterEntities) => {
return combineLatest(filterEntities.reduce((obs, row) => {
- 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"
Further reading
Function ngOnInit
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
ngOnInit() {
this.committedAction = this.metricsConfig.metricsAction;
this.metricsMonitor = this.entityMonitorFactory.create<IMetrics>(
this.metricsConfig.metricsAction.guid,
this.committedAction
- 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"
Further reading
Function syncFavorite
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
private syncFavorite(favorite: UserFavorite<IFavoriteMetadata>, entities: GeneralRequestDataState) {
if (favorite) {
const isEndpoint = (favorite.entityType === endpointEntityType);
// If the favorite is an endpoint ensure we look in the stratosEndpoint part of the store instead of, for example, cfEndpoint
const entityKey = isEndpoint ? entityCatalog.getEntityKey({
- 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"
Further reading
Function getCurrentPageStartIndex
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
export function getCurrentPageStartIndex<T = any>(entities: (T | T[])[], pageSize: number, requiredPage: number) {
const data = {
index: null,
currentPage: 0,
splitPages: 0
- 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"
Further reading
Function ngOnInit
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
ngOnInit() {
if (this.addSelect || this.expandComponent || this.addActions) {
const newColumns = [...this.columns];
if (this.addSelect) {
newColumns.splice(0, 0, tableColumnSelect);
- 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"
Further reading
Function handleOther
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
private handleOther(auth: AuthState) {
this.loggedIn = auth.loggedIn;
this.loggingIn = auth.loggingIn;
this.isLoginFlow = this.isLoginFlow || auth.loggingIn;
this.verifying = auth.verifying;
- 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"
Further reading
Trailing spaces Open
3. Create the container
- Read upRead up
- Exclude checks
MD009 - Trailing spaces
Tags: whitespace
Aliases: no-trailing-spaces
Parameters: br_spaces (number; default: 0)
This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.
The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.
Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.
Ordered list item prefix Open
3. Create a symlink to the root of the repository in `deploy/stratos-ui-release/src/`
- Read upRead up
- Exclude checks
MD029 - Ordered list item prefix
Tags: ol
Aliases: ol-prefix
Parameters: style ("one", "ordered"; default "one")
This rule is triggered on ordered lists that do not either start with '1.' or do not have a prefix that increases in numerical order (depending on the configured style, which defaults to 'one').
Example valid list if the style is configured as 'one':
1. Do this.
1. Do that.
1. Done.
Example valid list if the style is configured as 'ordered':
1. Do this.
2. Do that.
3. Done.
Ordered list item prefix Open
7. List deployment
- Read upRead up
- Exclude checks
MD029 - Ordered list item prefix
Tags: ol
Aliases: ol-prefix
Parameters: style ("one", "ordered"; default "one")
This rule is triggered on ordered lists that do not either start with '1.' or do not have a prefix that increases in numerical order (depending on the configured style, which defaults to 'one').
Example valid list if the style is configured as 'one':
1. Do this.
1. Do that.
1. Done.
Example valid list if the style is configured as 'ordered':
1. Do this.
2. Do that.
3. Done.