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

view functions extracted to source files should be excluded from scancode #3315

Closed
rabbah opened this issue Feb 20, 2018 · 5 comments
Closed

Comments

@rabbah
Copy link
Member

rabbah commented Feb 20, 2018

@chetanmeh i had run your gradle target at some point and because i also run a git commit hook, the generated files will fail my commit; we should exclude these files from code scan:

[./tools/dev/build/views/activations-byDate.js]:
       5: file does not end with EOL.
  [./tools/dev/build/views/all-whisks.v2.1.0-all.js]:
       8: line has trailing whitespaces.
      44: file does not end with EOL.
  [./tools/dev/build/views/logCleanup-byDateWithLogs.js]:
      15: file does not end with EOL.
  [./tools/dev/build/views/subjects-identities.js]:
      14: file does not end with EOL.
  [./tools/dev/build/views/whisks.v2.1.0-actions.js]:
      22: file does not end with EOL.
  [./tools/dev/build/views/whisks.v2.1.0-packages-public.js]:
       2: line has trailing whitespaces.
      17: file does not end with EOL.
  [./tools/dev/build/views/whisks.v2.1.0-packages.js]:
      19: file does not end with EOL.
  [./tools/dev/build/views/whisks.v2.1.0-rules.js]:
      12: file does not end with EOL.
  [./tools/dev/build/views/whisks.v2.1.0-triggers.js]:
      20: file does not end with EOL.

@markusthoemmes
Copy link
Contributor

We should rather exclude build folders entirely. They are meant for generated artifacts.

@chetanmeh
Copy link
Member

chetanmeh commented Feb 21, 2018

@rabbah I had made relevant exclude entry in scanConfig and it works for me. How does your commit hook setup looks like?

I saw this issue when commit hook was not passing the scanConfig path. See also #3295

@rabbah
Copy link
Member Author

rabbah commented Feb 21, 2018

> cat .git/hooks/pre-commit
#!/usr/bin/env bash

set -e

# format all scala soruce
echo "formatting scala source"
$OPENWHISK_HOME/tools/git/pre-commit-scalafmt-native.sh

# scan all other files for conformance
python $OPENWHISK_HOME/../incubator-openwhisk-utilities/scancode/scanCode.py .

@chetanmeh
Copy link
Member

So it misses on passing the scanConfig. Can you try the changes mentioned in #3295 ?

@chetanmeh
Copy link
Member

@rabbah Does the scanCode change suggested fixes this issue for you? Otherwise we can close this issue

@rabbah rabbah closed this as completed Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants