Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
10 changes: 6 additions & 4 deletions analyzer.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ const getAllFiles = (deep, dir, extn, files, result, regex) => {
result,
regex,
);
} catch (error) {}
} catch (error) {
// ignore
}
} else {
if (regex.test(file)) {
result.push(file);
Expand Down Expand Up @@ -197,16 +199,16 @@ const fileToParseableCode = (file) => {
)
.replace(
vueBindRegex,
(match, grA, grB, grC) =>
(_match, grA, grB, grC) =>
grA.replaceAll(/\S/g, " ") + grB + grC.replaceAll(/\S/g, " "),
)
.replace(
vuePropRegex,
(match, grA, grB) => ` ${grA.replace(/[.:@]/g, " ")}${grB}`,
(_match, grA, grB) => ` ${grA.replace(/[.:@]/g, " ")}${grB}`,
)
.replace(
vueTemplateRegex,
(match, grA, grB, grC) =>
(_match, grA, grB, grC) =>
grA + grB.replaceAll("{{", "{ ").replaceAll("}}", " }") + grC,
);
}
Expand Down
27 changes: 23 additions & 4 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,40 @@
},
"linter": {
"enabled": true,
"ignore": ["types/**"],
"ignore": ["types/**", "contrib/**"],
"rules": {
"recommended": true,
"complexity": {
"noForEach": "off",
"useLiteralKeys": "off"
"useLiteralKeys": "off",
"noUselessTernary": "warn"
},
"correctness": {
"noUndeclaredVariables": "error",
"noUnnecessaryContinue": "warn",
"noConstAssign": "error",
"noConstantCondition": "error",
"noUnreachable": "info"
},
"performance": {
"noDelete": "off"
},
"style": {
"noParameterAssign": "off"
"noParameterAssign": "off",
"noShoutyConstants": "warn",
"noUselessElse": "warn"
},
"suspicious": {
"noAssignInExpressions": "off"
"noAssignInExpressions": "off",
"noDoubleEquals": "warn",
"noAsyncPromiseExecutor": "warn",
"noControlCharactersInRegex": "warn",
"noDebugger": "error",
"noEmptyBlockStatements": "warn"
},
"nursery": {
"noUnusedFunctionParameters": "warn",
"noDuplicateElseIf": "warn"
}
}
},
Expand Down
12 changes: 9 additions & 3 deletions docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,9 @@ export const extractTar = async (fullImageName, dir) => {
strict: true,
C: dir,
portable: true,
onwarn: () => {},
onwarn: () => {
// ignore
},
filter: (path, entry) => {
// Some files are known to cause issues with extract
if (
Expand Down Expand Up @@ -1078,7 +1080,9 @@ export const exportImage = async (fullImageName) => {
strict: true,
C: tempDir,
portable: true,
onwarn: () => {},
onwarn: () => {
// ignore
},
}),
);
} catch (err) {
Expand All @@ -1095,7 +1099,9 @@ export const exportImage = async (fullImageName) => {
strict: true,
C: tempDir,
portable: true,
onwarn: () => {},
onwarn: () => {
// ignore
},
}),
);
} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion envcontext.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function getOriginUrl(dir) {
*
* @returns Output from git config or undefined
*/
export function getBranch(configKey, dir) {
export function getBranch(_configKey, dir) {
return execGitCommand(dir, ["rev-parse", "--abbrev-ref", "HEAD"]);
}

Expand Down
6 changes: 3 additions & 3 deletions evinser.js
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ export const detectServicesFromUDT = (
}
};

export const constructServiceName = (language, slice) => {
export const constructServiceName = (_language, slice) => {
let serviceName = "service";
if (slice?.fullName) {
serviceName = slice.fullName.split(":")[0].replace(/\./g, "-");
Expand Down Expand Up @@ -1149,7 +1149,7 @@ export const collectDataFlowFrames = async (
userDefinedTypesMap,
dataFlowSlice,
dbObjMap,
purlLocationMap,
_purlLocationMap,
purlImportsMap,
) => {
const nodes = dataFlowSlice?.graph?.nodes || [];
Expand Down Expand Up @@ -1268,7 +1268,7 @@ export const collectDataFlowFrames = async (
* @param {string} language Application language
* @param {Object} reachablesSlice Reachables slice object from atom
*/
export const collectReachableFrames = (language, reachablesSlice) => {
export const collectReachableFrames = (_language, reachablesSlice) => {
const reachableNodes = reachablesSlice?.reachables || [];
// purl key and an array of frames array
// CycloneDX 1.5 currently accepts only 1 frame as evidence
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import {
executeParallelGradleProperties,
extractJarArchive,
frameworksList,
generatePixiLockFile,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have repo tests for pixi with type python which would have caught this

getAllFiles,
getCppModules,
getGradleCommand,
Expand Down Expand Up @@ -4268,7 +4269,7 @@ export function createCloudBuildBom(path, options) {
* @param {string} path to the project
* @param {Object} options Parse options from the cli
*/
export function createOSBom(path, options) {
export function createOSBom(_path, options) {
console.warn(
"About to generate OBOM for the current OS installation. This will take several minutes ...",
);
Expand Down
4 changes: 2 additions & 2 deletions postgen.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function postProcess(bomNSData, options) {
*
* @returns {Object} Filtered BOM JSON
*/
export function applyMetadata(bomJson, options) {
export function applyMetadata(bomJson, _options) {
if (!bomJson?.components) {
return bomJson;
}
Expand Down Expand Up @@ -265,7 +265,7 @@ export function filterBom(bomJson, options) {
/**
* Clean up
*/
export function cleanupEnv(options) {
export function cleanupEnv(_options) {
if (process.env?.PIP_TARGET?.startsWith(tmpdir())) {
rmSync(process.env.PIP_TARGET, { recursive: true, force: true });
}
Expand Down
2 changes: 1 addition & 1 deletion pregen.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function prepareSdkmanBuild(projectType) {
* @param {String} filePath Path
* @param {Object} options CLI Options
*/
export function preparePythonEnv(filePath, options) {
export function preparePythonEnv(_filePath, options) {
if (hasAnyProjectType("python", options, false)) {
if (arch() !== "x64") {
console.log(
Expand Down
2 changes: 1 addition & 1 deletion types/analyzer.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion types/docker.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion types/envcontext.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function getOriginUrl(dir: string): any;
*
* @returns Output from git config or undefined
*/
export function getBranch(configKey: string, dir: string): any;
export function getBranch(_configKey: any, dir: string): any;
/**
* Retrieves the tree and parent hash for a git repo
* @param {string} dir repo directory
Expand Down
2 changes: 1 addition & 1 deletion types/envcontext.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions types/evinser.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -581,11 +581,11 @@ export function parseSliceUsages(language: string, userDefinedTypesMap: any, sli
export function isFilterableType(language: any, userDefinedTypesMap: any, typeFullName: any): boolean;
export function detectServicesFromUsages(language: string, slice: any, servicesMap?: any): any[];
export function detectServicesFromUDT(language: string, userDefinedTypes: any[], servicesMap: any): void;
export function constructServiceName(language: any, slice: any): string;
export function constructServiceName(_language: any, slice: any): string;
export function extractEndpoints(language: any, code: any): any;
export function createEvinseFile(sliceArtefacts: any, options: any): any;
export function collectDataFlowFrames(language: string, userDefinedTypesMap: any, dataFlowSlice: any, dbObjMap: any, purlLocationMap: any, purlImportsMap: any): Promise<{}>;
export function collectReachableFrames(language: string, reachablesSlice: any): {
export function collectDataFlowFrames(language: string, userDefinedTypesMap: any, dataFlowSlice: any, dbObjMap: any, _purlLocationMap: any, purlImportsMap: any): Promise<{}>;
export function collectReachableFrames(_language: any, reachablesSlice: any): {
dataFlowFrames: {};
cryptoComponents: {
type: string;
Expand Down
2 changes: 1 addition & 1 deletion types/evinser.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export function createCloudBuildBom(path: string, options: any): any;
* @param {string} path to the project
* @param {Object} options Parse options from the cli
*/
export function createOSBom(path: string, options: any): Promise<any>;
export function createOSBom(_path: any, options: any): Promise<any>;
/**
* Function to create bom string for Jenkins plugins
*
Expand Down
2 changes: 1 addition & 1 deletion types/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions types/postgen.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function postProcess(bomNSData: any, options: any): any;
*
* @returns {Object} Filtered BOM JSON
*/
export function applyMetadata(bomJson: any, options: any): any;
export function applyMetadata(bomJson: any, _options: any): any;
/**
* Apply definitions.standards based on options
*
Expand All @@ -37,5 +37,5 @@ export function filterBom(bomJson: any, options: any): any;
/**
* Clean up
*/
export function cleanupEnv(options: any): void;
export function cleanupEnv(_options: any): void;
//# sourceMappingURL=postgen.d.ts.map
2 changes: 1 addition & 1 deletion types/postgen.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion types/pregen.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function prepareSdkmanBuild(projectType: string): boolean;
* @param {String} filePath Path
* @param {Object} options CLI Options
*/
export function preparePythonEnv(filePath: string, options: any): void;
export function preparePythonEnv(_filePath: any, options: any): void;
/**
* Method to check and prepare the environment for node
*
Expand Down
2 changes: 1 addition & 1 deletion types/pregen.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions types/utils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ export function repoMetadataToGitHubApiUrl(repoMetadata: any): string | undefine
*
*
*/
export function generatePixiLockFile(path: any): void;
export function generatePixiLockFile(_path: any): void;
/**
* Method to split GitHub url into its parts
* @param {String} repoUrl Repository url
Expand Down Expand Up @@ -921,7 +921,7 @@ export function parseSwiftResolved(resolvedFile: string): {
* @param {boolean} includeCacheDir Include maven and gradle cache directories
*/
export function collectMvnDependencies(mavenCmd: string, basePath: string, cleanup?: boolean, includeCacheDir?: boolean): Promise<{}>;
export function collectGradleDependencies(gradleCmd: any, basePath: any, cleanup?: boolean, includeCacheDir?: boolean): Promise<{}>;
export function collectGradleDependencies(_gradleCmd: any, _basePath: any, _cleanup?: boolean, _includeCacheDir?: boolean): Promise<{}>;
/**
* Method to collect class names from all jars in a directory
*
Expand Down
Loading