Skip to content

Commit

Permalink
typo: update allCalls to be allFunctionCalls to stay consistent w…
Browse files Browse the repository at this point in the history
…ith the name of the generated output file
  • Loading branch information
EagleoutIce committed Aug 16, 2023
1 parent 823503b commit 56c1be4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/statistics/features/supported/usedFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, ... */
Expand All @@ -42,7 +42,7 @@ export interface FunctionUsageInfo extends FeatureInfo {
}

const initialFunctionUsageInfo = (): FunctionUsageInfo => ({
allCalls: 0,
allFunctionCalls: 0,
mathFunctions: 0,
programmingFunctions: 0,
sessionManagementFunctions: 0,
Expand Down Expand Up @@ -122,7 +122,7 @@ export const usedFunctions: Feature<FunctionUsageInfo> = {
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)
Expand Down
2 changes: 1 addition & 1 deletion test/statistics/features/usedFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Used Function Calls', withShell(shell => {
name: 'one call',
code: 'b()',
expected: {
allCalls: 1
allFunctionCalls: 1
}
}
])
Expand Down

0 comments on commit 56c1be4

Please sign in to comment.