Showing 718 of 1,370 total issues
Function getKubeDashboardServiceAccount
has 5 return statements (exceeds 4 allowed). Open
func getKubeDashboardServiceAccount(p interfaces.PortalProxy, cnsiGUID, userGUID string, labelSelector string) (*v1.ServiceAccount, error) {
log.Debug("getKubeDashboardService request")
response, err := p.DoProxySingleRequest(cnsiGUID, userGUID, "GET", "/api/v1/serviceaccounts?labelSelector="+labelSelector, nil, nil)
if err != nil || response.StatusCode != 200 {
Method PgsqlTokenRepository.FindAuthToken
has 5 return statements (exceeds 4 allowed). Open
func (p *PgsqlTokenRepository) FindAuthToken(userGUID string, encryptionKey []byte) (interfaces.TokenRecord, error) {
log.Debug("FindAuthToken")
if userGUID == "" {
msg := "Unable to find UAA Token without a valid User GUID."
log.Debug(msg)
Function setupAutoSelectors
has a Cognitive Complexity of 10 (exceeds 8 allowed). Consider refactoring. Open
private setupAutoSelectors(initialCf: string, initialOrg: string) {
// Clear or automatically select org + space given cf
let cfTapped = false;
const orgResetSub = this.cf.select.asObservable().pipe(
startWith(initialCf),
- 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 addFile
has a Cognitive Complexity of 10 (exceeds 8 allowed). Consider refactoring. Open
addFile(file) {
// Make the folder for the file
const fileParts = file.webkitRelativePath.split('/');
let context = this.root;
let fullPath = '';
- 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 10 (exceeds 8 allowed). Consider refactoring. Open
constructor(
private store: Store<any>,
private route: ActivatedRoute,
router: Router,
kubeId: BaseKubeGuid,
- 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 10 (exceeds 8 allowed). Consider refactoring. Open
constructor(
public endpointsService: EndpointsService,
private store: Store<AppState>,
public userFavoriteManager: UserFavoriteManager,
private scrollDispatcher: ScrollDispatcher,
- 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 10 (exceeds 8 allowed). Consider refactoring. Open
ngOnInit() {
const helmLastModifiedRegEx = /seconds:([0-9]*)/;
this.sessionData$ = this.store.select(s => s.auth).pipe(
- 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 10 (exceeds 8 allowed). Consider refactoring. Confirmed
ngOnInit() {
const events$ = this.eventService.events$.pipe(
map(events => {
if (this.endpointOnly) {
return events.filter(event => event.key.split('-')[0] === 'endpointError');
- 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 applyRoutesFromExtensions
has a Cognitive Complexity of 10 (exceeds 8 allowed). Consider refactoring. Open
private applyRoutesFromExtensions(router: Router) {
const routeConfig = [...router.config];
// Find the route that has the 'about' page as a child - this is the dashboard base
const dashboardRoute = routeConfig.find(r => {
- 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 canGoto
has a Cognitive Complexity of 10 (exceeds 8 allowed). Consider refactoring. Open
canGoto(index: number): boolean {
if (index < 0 && this.basePreviousRedirect) {
return true;
}
const step = this.steps[this.currentIndex];
- 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
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return appStateMatch[extState];
Avoid too many return
statements within this function. Open
return {
label: 'Unknown',
indicator: StratosStatus.ERROR,
actions: null
};
Avoid too many return
statements within this function. Open
return flatTree;
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return enterPaginationReducer(state, action, updatePagination);
Avoid too many return
statements within this function. Open
return true;