Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SonarCloud fixes #4235

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ const isRuleActionValid = (value: unknown, actionDefinitions: ActionDefinitionTr
: undefined;
return (
isRuleAction(value) &&
actionDefinition &&
actionDefinition.parameterDefinitions.reduce(
actionDefinition?.parameterDefinitions.reduce(
(isValid: boolean, paramDef: ActionParameterDefinitionTransformed) => isValid && (!paramDef.mandatory || !!value.params[paramDef.name]),
true
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import { Rule } from '../model/rule.model';
providedIn: 'root'
})
export class FolderRuleSetsService {
public static MAX_RULE_SETS_PER_GET = 100;
public static readonly MAX_RULE_SETS_PER_GET = 100;

static isOwnedRuleSet(ruleSet: RuleSet, nodeId: string): boolean {
return ruleSet?.owningFolder?.id === nodeId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ interface GetRulesResult {
providedIn: 'root'
})
export class FolderRulesService {
public static MAX_RULES_PER_GET = 100;
public static readonly MAX_RULES_PER_GET = 100;

public static get emptyCompositeCondition(): RuleCompositeCondition {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class LocationLinkComponent implements OnInit {
ngOnInit() {
if (this.context) {
const node: NodeEntry = this.context.row.node;
if (node?.entry && node?.entry?.path) {
if (node?.entry?.path) {
const path = node.entry.path;

if (path?.name && path?.elements) {
Expand Down
4 changes: 2 additions & 2 deletions projects/aca-playwright-shared/src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import StreamZip from 'node-stream-zip';
import { NodesApi, SitesApi, TrashcanApi } from '../api';

export class Utils {
static string257Long = 'x'.repeat(257);
static string513Long = 'x'.repeat(513);
static readonly string257Long = 'x'.repeat(257);
static readonly string513Long = 'x'.repeat(513);

static random(): string {
return crypto.getRandomValues(new Uint32Array(1))[0].toString(36).substring(0, 5).toLowerCase();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface PermissionOptions {
providedIn: 'root'
})
export class NodePermissionService implements NodePermissions {
static DEFAULT_OPERATION = 'OR';
static readonly DEFAULT_OPERATION = 'OR';

private defaultOptions: PermissionOptions = {
operation: NodePermissionService.DEFAULT_OPERATION,
Expand Down
4 changes: 2 additions & 2 deletions scripts/gh/update/latest-version-of.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ module.exports = async ({ exec, github, dependencyName, tag }) => {
}
}

const latestPkgToUpdate = availablePackages.find((package) => package.name === matchedPkgVersion);
const latestPkgToUpdate = availablePackages.find((pkg) => pkg.name === matchedPkgVersion);

if (localVersion === latestPkgToUpdate?.name) {
return { hasNewVersion: 'false' };
} else {
const findLocalVersionOnRemote = availablePackages.find((package) => package.name === localVersion);
const findLocalVersionOnRemote = availablePackages.find((pkg) => pkg.name === localVersion);
let rangeInDays = 'N/A';
if (findLocalVersionOnRemote !== undefined) {
const creationLocal = new Date(findLocalVersionOnRemote.created_at);
Expand Down
Loading