From 56c1be466ef8d65f5078507ff04d14f25e57c843 Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Wed, 16 Aug 2023 13:52:10 +0200 Subject: [PATCH] typo: update `allCalls` to be `allFunctionCalls` to stay consistent with the name of the generated output file --- src/statistics/features/supported/usedFunctions.ts | 6 +++--- test/statistics/features/usedFunctions.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/statistics/features/supported/usedFunctions.ts b/src/statistics/features/supported/usedFunctions.ts index fa2f8526a0..260330e061 100644 --- a/src/statistics/features/supported/usedFunctions.ts +++ b/src/statistics/features/supported/usedFunctions.ts @@ -15,7 +15,7 @@ export interface UsedFunction { // TODO: get corresponding package with getNamespaceExports etc? export interface FunctionUsageInfo extends FeatureInfo { - allCalls: number + allFunctionCalls: number /** abs, expm1, tanpi, ... */ mathFunctions: number /** nargs, missing, is.character, ... */ @@ -42,7 +42,7 @@ export interface FunctionUsageInfo extends FeatureInfo { } const initialFunctionUsageInfo = (): FunctionUsageInfo => ({ - allCalls: 0, + allFunctionCalls: 0, mathFunctions: 0, programmingFunctions: 0, sessionManagementFunctions: 0, @@ -122,7 +122,7 @@ export const usedFunctions: Feature = { process(existing: FunctionUsageInfo, input: Document, filepath: string | undefined): FunctionUsageInfo { const allFunctionCalls = functionCallQuery.select({ node: input }) - existing.allCalls += allFunctionCalls.length + existing.allFunctionCalls += allFunctionCalls.length append(this.name, 'allFunctionCalls', allFunctionCalls, filepath) const names = allFunctionCalls.map(extractNodeContent) diff --git a/test/statistics/features/usedFunctions.ts b/test/statistics/features/usedFunctions.ts index cc960b7d55..57ee0015fa 100644 --- a/test/statistics/features/usedFunctions.ts +++ b/test/statistics/features/usedFunctions.ts @@ -13,7 +13,7 @@ describe('Used Function Calls', withShell(shell => { name: 'one call', code: 'b()', expected: { - allCalls: 1 + allFunctionCalls: 1 } } ])