[infer][java] Infer now reports errors with relative paths on Ant and Gradle projects

Summary:
Having the gradle integration reporting errors using relative paths is required to make Infer usable with CI tools
master
jrm 9 years ago
parent 027ba53203
commit 0a2571c10a

@ -67,8 +67,7 @@ def prepare_build(args):
infer_options = [
'--buck',
'--incremental',
'--analyzer',
args.analyzer,
'--analyzer', args.analyzer,
]
if args.debug:

@ -120,6 +120,11 @@ inferJ_group.add_argument('-pr', '--project_root',
help='Location of the project root '
'(default is current directory)')
inferJ_group.add_argument('--absolute-paths',
action='store_true',
default=False,
help='Report errors with absolute paths')
inferJ_group.add_argument('--objc_ml_buckets',
dest='objc_ml_buckets',
help='memory leak buckets to be checked, '
@ -411,8 +416,8 @@ class Infer:
infer_cmd = [utils.get_cmd_in_bin_dir('InferJava')]
if self.args.buck:
infer_cmd += ['-project_root', os.getcwd()]
if not self.args.absolute_paths:
infer_cmd += ['-project_root', self.args.project_root]
infer_cmd += [
'-results_dir', self.args.infer_out,

@ -18,6 +18,7 @@ clean_cmd = ' '.join(['rm', '-rf', out])
classpath = ':'.join([('$(classpath ' + path + ')') for path in dependencies])
infer_cmd = ' '.join([
'infer',
'--absolute-paths',
'-o', out,
'-a', 'checkers',
'--',

@ -24,6 +24,7 @@ classpath = ':'.join([('$(classpath ' + path + ')') for path in dependencies])
env_cmd = ' '.join(['export', 'ERADICATE_RETURN_OVER_ANNOTATED=1'])
infer_cmd = ' '.join([
'infer',
'--absolute-paths',
'-o', out,
'-a', 'eradicate',
'--',

@ -23,6 +23,7 @@ def analysis_cmd(analyzer):
classpath = ':'.join([('$(classpath ' + path + ')') for path in dependencies])
infer_cmd = ' '.join([
'infer',
'--absolute-paths',
'--no-filtering',
'-o', out,
'-a', analyzer,

@ -18,6 +18,7 @@ clean_cmd = ' '.join(['rm', '-rf', out])
classpath = ':'.join([('$(classpath ' + path + ')') for path in dependencies])
infer_cmd = ' '.join([
'infer',
'--absolute-paths',
'-o', out,
'-a', 'tracing',
'--',

Loading…
Cancel
Save