Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Add options to cccheck to find source in a different location #462

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yaakov-h
Copy link
Contributor

cccheck currently reads the paths to source files out of the PDBs. This is required for some suppressions to work, e.g. RequiresAtCall.

What I need to be able to do for distributed testing is build in one path, e.g. C:\Build\MyProject, and then invoke cccheck from another computer entirely in a different path, e.g. C:\Testing\TestRun001\MyProject.

This pull request adds two command-line flags.

  • -sourcePaths lists partial paths that the project was built from.
  • -alternativeSourcePaths lists alternative/substitute paths that can be used to replace a partial path from -sourcePaths.

For example, with these changes I can successfully test an assembly in the scenario above by running:

C:\Testing\TestRun001\MyProject\bin\CodeContractsDeclarative>C:\path\to\cccheck.exe @MyProject.rsp -sourcePaths:C:\Build\MyProject -alternativeSourcePaths:C:\Testing\TestRun001\MyProject

If you don't supply both -sourcePaths and -alternativeSourcePaths, these changes have no other effect.

This goes hand-in-hand with #459.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants