bake-toolkit 2.27.0 → 2.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/bakeqac +3 -3
- data/documentation/_build/html/_sources/changelog.txt +9 -1
- data/documentation/_build/html/_sources/concepts/prebuild.txt +1 -1
- data/documentation/_build/html/_sources/index.txt +1 -1
- data/documentation/_build/html/_sources/known_issues.txt +0 -2
- data/documentation/_build/html/_sources/tips_and_tricks/static_code_analysis.txt +122 -122
- data/documentation/_build/html/_sources/tips_and_tricks/tips_and_tricks.txt +0 -1
- data/documentation/_build/html/_static/syntax.html +18 -13
- data/documentation/_build/html/changelog.html +11 -1
- data/documentation/_build/html/concepts/build_hierarchy.html +1 -1
- data/documentation/_build/html/concepts/inject.html +1 -1
- data/documentation/_build/html/concepts/link_order.html +1 -1
- data/documentation/_build/html/concepts/prebuild.html +1 -1
- data/documentation/_build/html/concepts/the_main_project.html +1 -1
- data/documentation/_build/html/concepts/the_project_meta_file.html +1 -1
- data/documentation/_build/html/ide/eclipse/eclipse.html +1 -1
- data/documentation/_build/html/ide/eclipse/how_to_convert_existing_cdt_workspace.html +1 -1
- data/documentation/_build/html/ide/eclipse/how_to_create_a_new_project_in_eclipse.html +1 -1
- data/documentation/_build/html/ide/eclipse/how_to_create_a_workspace_in_eclipse.html +1 -1
- data/documentation/_build/html/ide/eclipse/how_to_debug_in_eclipse.html +1 -1
- data/documentation/_build/html/ide/eclipse/how_to_install_eclipse_plugin.html +1 -1
- data/documentation/_build/html/ide/eclipse/how_to_use_bake_in_eclipse.html +1 -1
- data/documentation/_build/html/ide/vs/how_to_create_vs_projects.html +1 -1
- data/documentation/_build/html/ide/vs/how_to_debug_in_vs.html +3 -3
- data/documentation/_build/html/ide/vs/how_to_used_bake_in_vs.html +1 -1
- data/documentation/_build/html/ide/vs/vs.html +1 -1
- data/documentation/_build/html/ide/vs/vs_install.html +1 -1
- data/documentation/_build/html/index.html +4 -5
- data/documentation/_build/html/install/install_bake.html +1 -1
- data/documentation/_build/html/internal.html +1 -1
- data/documentation/_build/html/known_issues.html +1 -3
- data/documentation/_build/html/license.html +1 -1
- data/documentation/_build/html/performance/performance.html +3 -3
- data/documentation/_build/html/quickstart/quickstart.html +1 -1
- data/documentation/_build/html/searchindex.js +1 -1
- data/documentation/_build/html/syntax/auto_adjustment.html +1 -1
- data/documentation/_build/html/syntax/derive_configs.html +1 -1
- data/documentation/_build/html/syntax/project_meta_syntax.html +18 -13
- data/documentation/_build/html/syntax/variable_substitutions.html +1 -1
- data/documentation/_build/html/tips_and_tricks/dot.html +4 -4
- data/documentation/_build/html/tips_and_tricks/how_to_use_bake_with_cygwin.html +4 -4
- data/documentation/_build/html/tips_and_tricks/static_code_analysis.html +284 -284
- data/documentation/_build/html/tips_and_tricks/the_bakery.html +6 -6
- data/documentation/_build/html/tips_and_tricks/the_clang.html +2 -2
- data/documentation/_build/html/tips_and_tricks/tips_and_tricks.html +0 -1
- data/documentation/_build/html/why_bake/why_bake.html +3 -3
- data/lib/bake/model/metamodel.rb +2 -6
- data/lib/bake/model/metamodel_ext.rb +9 -0
- data/lib/bake/options/options.rb +11 -38
- data/lib/bake/options/usage.rb +1 -10
- data/lib/bake/subst.rb +12 -3
- data/lib/bake/toolchain/provider.rb +1 -3
- data/lib/bake/util.rb +0 -7
- data/lib/blocks/block.rb +2 -0
- data/lib/blocks/blockBase.rb +2 -8
- data/lib/blocks/commandLine.rb +3 -3
- data/lib/blocks/compile.rb +0 -2
- data/lib/blocks/executable.rb +1 -3
- data/lib/blocks/fileList.rb +53 -0
- data/lib/blocks/has_execute_command.rb +2 -2
- data/lib/blocks/library.rb +0 -2
- data/lib/blocks/makefile.rb +4 -4
- data/lib/common/version.rb +1 -1
- data/lib/tocxx.rb +39 -37
- metadata +3 -6
- data/lib/bake/bundle.rb +0 -159
- data/lib/bake/toolchain/errorparser/lint_error_parser.rb +0 -34
- data/lib/bake/toolchain/lint.rb +0 -19
- data/lib/blocks/lint.rb +0 -56
@@ -1,34 +0,0 @@
|
|
1
|
-
require 'bake/toolchain/errorparser/error_parser'
|
2
|
-
|
3
|
-
module Bake
|
4
|
-
class LintErrorParser < ErrorParser
|
5
|
-
|
6
|
-
def initialize()
|
7
|
-
@error_expression = /([^:]*):([0-9]+): ([A-Za-z]+)[ ]*(.+)/
|
8
|
-
end
|
9
|
-
|
10
|
-
def scan_lines(consoleOutput, proj_dir)
|
11
|
-
res = []
|
12
|
-
consoleOutputFullnames = ""
|
13
|
-
consoleOutput[0].each_line do |l|
|
14
|
-
d = ErrorDesc.new
|
15
|
-
scan_res = l.gsub(/\r\n?/, "").scan(@error_expression)
|
16
|
-
if scan_res.length > 0
|
17
|
-
if (scan_res[0][0] == "")
|
18
|
-
d.file_name = proj_dir
|
19
|
-
else
|
20
|
-
d.file_name = File.expand_path(scan_res[0][0])
|
21
|
-
end
|
22
|
-
d.line_number = scan_res[0][1].to_i
|
23
|
-
d.severity = get_severity(scan_res[0][2])
|
24
|
-
d.message = scan_res[0][3]
|
25
|
-
l.gsub!(scan_res[0][0],d.file_name)
|
26
|
-
end
|
27
|
-
res << d
|
28
|
-
consoleOutputFullnames << l
|
29
|
-
end
|
30
|
-
[res, consoleOutputFullnames]
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
34
|
-
end
|
data/lib/bake/toolchain/lint.rb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
require 'common/utils'
|
2
|
-
require 'bake/toolchain/provider'
|
3
|
-
require 'bake/toolchain/errorparser/lint_error_parser'
|
4
|
-
|
5
|
-
module Bake
|
6
|
-
module Toolchain
|
7
|
-
|
8
|
-
LintChain = Provider.add("Lint")
|
9
|
-
|
10
|
-
LintChain[:COMPILER][:CPP].update({
|
11
|
-
:COMMAND => "lint-nt.exe",
|
12
|
-
:DEFINE_FLAG => "-D",
|
13
|
-
:COMPILE_FLAGS => ["-b","-\"format=%f%(:%l:%) %t %n: %m\"", "-width(0)", "-hF1", "-zero"], # array, not string!
|
14
|
-
})
|
15
|
-
|
16
|
-
LintChain[:COMPILER][:CPP][:ERROR_PARSER] = LintErrorParser.new
|
17
|
-
|
18
|
-
end
|
19
|
-
end
|
data/lib/blocks/lint.rb
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
require 'blocks/compile'
|
2
|
-
|
3
|
-
module Bake
|
4
|
-
module Blocks
|
5
|
-
class Lint < Compile
|
6
|
-
|
7
|
-
def initialize(block, config, referencedConfigs, tcs)
|
8
|
-
super(block,config, referencedConfigs, tcs)
|
9
|
-
end
|
10
|
-
|
11
|
-
def execute
|
12
|
-
success = true
|
13
|
-
Dir.chdir(@projectDir) do
|
14
|
-
compiler = @tcs[:COMPILER][:CPP]
|
15
|
-
calcSources
|
16
|
-
|
17
|
-
noFilesToLint = (@source_files.length == 0)
|
18
|
-
|
19
|
-
if Bake.options.lint_min >= 1 and Bake.options.lint_min >= @source_files.length
|
20
|
-
noFilesToLint = true
|
21
|
-
end
|
22
|
-
|
23
|
-
if Bake.options.lint_max >= 0 and Bake.options.lint_max < Bake.options.lint_min
|
24
|
-
noFilesToLint = true
|
25
|
-
end
|
26
|
-
|
27
|
-
if noFilesToLint
|
28
|
-
Bake.formatter.printInfo("No files to lint", @config)
|
29
|
-
else
|
30
|
-
@source_files = @source_files[Bake.options.lint_min..Bake.options.lint_max]
|
31
|
-
|
32
|
-
cmd = [compiler[:COMMAND]]
|
33
|
-
cmd += compiler[:COMPILE_FLAGS]
|
34
|
-
|
35
|
-
cmd += @include_array[:CPP]
|
36
|
-
cmd += @define_array[:CPP]
|
37
|
-
|
38
|
-
cmd += @tcs[:LINT_POLICY]
|
39
|
-
|
40
|
-
cmd += @source_files
|
41
|
-
|
42
|
-
printCmd(cmd, "Linting #{@source_files.length} file(s)...", nil, false)
|
43
|
-
success, consoleOutput = ProcessHelper.run(cmd, false)
|
44
|
-
process_result(cmd, consoleOutput, compiler[:ERROR_PARSER], "Linting...", nil, success)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
return success
|
48
|
-
end
|
49
|
-
|
50
|
-
def clean
|
51
|
-
return true
|
52
|
-
end
|
53
|
-
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|