Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write usage guide #7

Open
aik099 opened this issue Jan 1, 2017 · 4 comments
Open

Write usage guide #7

aik099 opened this issue Jan 1, 2017 · 4 comments

Comments

@aik099
Copy link
Member

aik099 commented Jan 1, 2017

Need to write usage guide in README.md

@karthikeyan-manivasagam
Copy link

karthikeyan-manivasagam commented Jul 21, 2017

Pl add usage

@aik099
Copy link
Member Author

aik099 commented Jul 21, 2017

Is there any specific topic I can help you with?

Each of CLI commands has help on all arguments/options and there is sample config file in README.md. This should be enough to get started unless I've missed something?

@karthikeyan-manivasagam
Copy link

karthikeyan-manivasagam commented Jul 21, 2017

Hi Alex,

Yes I need to use it in projects as code reviewer, Please share any documentation of usage, I have cloned the repo in my local machine,

Thank you for your quick response

@aik099
Copy link
Member Author

aik099 commented Jul 21, 2017

Any specific commands you're interested it?

I personally use combination of sync and bc commands. The sync commands scans project code and builds database from it. And the bc command is able to compare 2 given scans and show if new version has introduced any BC breaks.

  1. It it designed to work as PHAR file and I was supposed to create PHAR on next release. Since no release happened yet no PHAR is available. Luckily if you have Box installed (see https://github.com/box-project/box2), then inside cloned repo (of Code Insight repo) you can run box build and that will create code-inside.phar file in the build folder (if it doesn't then please create empty build folder yourself and rerun box build).
  2. Copy the code-insight.phar somewhere in PATH.
  3. Go to project folder you want to scan.
  4. Create .code-insight.json file (specify where source code is and what autoloader to use).
  5. Run the code-insight.phar sync command to create DB for initial code version.

From this point you have 2 options on how to get BC break report:

Option 1:

  1. have old a new codebase in different folders, where a .code-insight.json file
  2. go to project folder with changes
  3. run code-insight.phar bc old_folder

Option 2

  1. have single folder with codebase
  2. go to project folder
  3. before making changes run code-insight.phar sync command
  4. after making changes run code-insight.phar sync --project-fork "with-changes" (the with-changes is name to indicate your changes used later)
  5. run code-insight.phar bc --target-project-fork "with-changes"

Then you should see if you've introduced any breaks.

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

No branches or pull requests

2 participants