Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…extension into update-readme-with-coverage
  • Loading branch information
jaisnan committed Oct 17, 2023
2 parents ccc341f + f73b940 commit d30daf8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
1 change: 0 additions & 1 deletion .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:

- name: Check TS linting
run: |
npm install -g [email protected]
npm install
npm run lint
Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ export namespace KaniArguments {
export const testsFlag: string = `--tests`;
export const outputFormatFlag: string = `--output-format`;
export const unstableFormatFlag: string = `--enable-unstable`;
export const stubbingFlag: string = `--enable-stubbing`;
export const stubbingFlag: string = `-Z=stubbing`;
}
20 changes: 7 additions & 13 deletions src/model/kaniCommandCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,13 @@ function createCommand(
testFlag: boolean = false,
stubbing_args?: boolean,
): string {
let harnessCommand = '';
if (!testFlag) {
if (stubbing_args === undefined || !stubbing_args) {
harnessCommand = `${KaniConstants.CargoKaniExecutableName} ${KaniArguments.packageFlag} ${packageName} ${KaniArguments.harnessFlag} ${harnessName}`;
} else {
harnessCommand = `${KaniConstants.CargoKaniExecutableName} ${KaniArguments.unstableFormatFlag} ${KaniArguments.stubbingFlag} ${KaniArguments.packageFlag} ${packageName} ${KaniArguments.harnessFlag} ${harnessName}`;
}
} else {
if (stubbing_args === undefined || !stubbing_args) {
harnessCommand = `${KaniConstants.CargoKaniExecutableName} ${KaniArguments.testsFlag} ${KaniArguments.packageFlag} ${packageName} ${KaniArguments.harnessFlag} ${harnessName}`;
} else {
harnessCommand = `${KaniConstants.CargoKaniExecutableName} ${KaniArguments.testsFlag} ${KaniArguments.unstableFormatFlag} ${KaniArguments.stubbingFlag} ${KaniArguments.packageFlag} ${packageName} ${KaniArguments.harnessFlag} ${harnessName}`;
}
let harnessCommand = `${KaniConstants.CargoKaniExecutableName} ${KaniArguments.packageFlag} ${packageName} ${KaniArguments.harnessFlag} ${harnessName}`;
if (testFlag) {
harnessCommand = `${harnessCommand} ${KaniArguments.testsFlag}`;
}

if (stubbing_args !== undefined && stubbing_args) {
harnessCommand = `${harnessCommand} ${KaniArguments.stubbingFlag}`;
}

return harnessCommand;
Expand Down

0 comments on commit d30daf8

Please sign in to comment.