bake-toolkit 2.42.1 → 2.42.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b90ba3d07f96a37da90faeb52c9349ccfbd3f40
4
- data.tar.gz: f82470db0e10bf5ec247fb2160a2c4a2bb55f0e5
3
+ metadata.gz: 75f143b6235632040aaa32c21fa78875e329f4d4
4
+ data.tar.gz: 1b9a9c6a99e4eb48b959729c560e0fe29bae8752
5
5
  SHA512:
6
- metadata.gz: 408c3b39a46ff98515567066393ecf09c62d735358f70143a29b02215525801b8e4fb242f07e40c58c14befec0b73570bec7b77e707af1ba2b8ee13373acd603
7
- data.tar.gz: 61e1799cdcdd3c5d353c69ac7b0ac5facfc475b1bd51b31dd796f9a96e75b778e2b77209fbda66b66ecd89b9b26d3ace60bfc41a27d712142e5d406c36e1539b
6
+ metadata.gz: 74ef7187d30bd03f96d20028de7d4b7e10c513ef60f2aa46245aced7b0135eae8ab7d8941285cb1d08059ae30e24b5601caef31ef8076f75267560cadee2650f
7
+ data.tar.gz: 8e1d680f7ad4488183c4cd96a9facf5bcd2e95cb81228ce692c89ac532278b720f68ec87d26767e21d067c858638d946043ce9f0bab89f956e3d667f30d257e6
data/bin/bakeqac CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'fileutils'
4
+ require 'set'
4
5
 
5
6
  $:.unshift(File.dirname(__FILE__)+"/../lib")
6
7
 
@@ -19,6 +20,26 @@ module Bake
19
20
 
20
21
  @@cipFileSize = 1
21
22
 
23
+ @@unsuppressibleErrorsList = [
24
+ "0019", "0020", "0031", "0034", "0035", "0036", "0061", "0098", "0099", "0224",
25
+ "0622", "0800", "0801", "0802", "0996", "1950", "1951", "1962", "1963", "1964",
26
+ "1965", "1966", "1967", "1968", "1969", "1970", "1971", "1972", "1973", "1974",
27
+ "1975", "1976", "1977", "1978", "1979", "1980", "1982", "1984", "1985", "1986",
28
+ "1987", "1989", "1990", "1991", "3104", "0014", "0015", "0016", "0021", "0022",
29
+ "0028", "0032", "0039", "0043", "0045", "0046", "0050", "0052", "0053", "0054",
30
+ "0058", "0059", "0079", "0083", "0101", "0133", "0150", "0165", "0170", "0174",
31
+ "0175", "0177", "0200", "0201", "0208", "0217", "0231", "0246", "0248", "0251",
32
+ "0253", "0255", "0257", "0271", "0276", "0278", "0279", "0282", "0284", "0285",
33
+ "0286", "0287", "0307", "0313", "0320", "0321", "0322", "0323", "0333", "0334",
34
+ "0335", "0336", "0339", "0400", "0401", "0403", "0404", "0405", "0415", "0424",
35
+ "0429", "0439", "0440", "0441", "0445", "0448", "0450", "0453", "0454", "0455",
36
+ "0456", "0457", "0458", "0459", "0469", "0481", "0482", "0483", "0484", "0491",
37
+ "0492", "0493", "0494", "0496", "0497", "0498", "0600", "0601", "0602", "0607",
38
+ "0608", "0611", "0616", "0617", "0619", "0620", "0621", "0627", "0631", "0632"]
39
+
40
+ @@unsuppressibleErrors = Set.new()
41
+ @@unsuppressibleErrorsList.each { |elem| @@unsuppressibleErrors << elem }
42
+
22
43
  def self.checkCipSize()
23
44
  cips = Dir.glob(@options.qacdata + "/**/*.cip")
24
45
  if !cips.empty?
@@ -301,6 +322,7 @@ $cmdRemoveLocks = qaExe + ["admin", "--qaf-project", @options.qacdata, "--remove
301
322
  linesOfFile = {}
302
323
  lineNum = 0
303
324
  currentMessage = []
325
+ suppressLine = false
304
326
  filteredLines.each do |line|
305
327
  if line.include? " ======= Results for "
306
328
  lineNum = 0
@@ -308,17 +330,41 @@ $cmdRemoveLocks = qaExe + ["admin", "--qaf-project", @options.qacdata, "--remove
308
330
  linesOfFile = {}
309
331
  sortedLines << line
310
332
  else
311
- if (!@options.qacnoformat && line.start_with?("MSG: ")) || (@options.qacnoformat && line.include?(": Msg("))
312
- lineScan = line.scan(/[^\(]*\((\d*)/)
313
- lineNum = lineScan[0][0].to_i if lineScan.length > 0
314
- end
315
- if linesOfFile.has_key?lineNum
316
- currentMessage = linesOfFile[lineNum]
333
+ if (!@options.qacnoformat && line.start_with?("MSG: ")) || (@options.qacnoformat && (line.include?(": Msg(") || line.include?(": Err(")))
334
+ begin
335
+ scanResult = line.scan(/([^\(\s]+)\s*\((\d+)[^\)]*\):\s*(Err|)\([^:]*:(\d+)\)/)
336
+ if scanResult.length > 0
337
+ fileName = scanResult[0][0].gsub("\\", "/")
338
+ lineNum = scanResult[0][1].to_i
339
+ errorNum = scanResult[0][3]
340
+ if (@@unsuppressibleErrors.include?errorNum)
341
+ srcLine = File.readlines(fileName)[lineNum-1]
342
+ if srcLine.match(Regexp.new("PRQA\s+S.+#{errorNum}"))
343
+ suppressLine = true
344
+ end
345
+ end
346
+ end
347
+ rescue Exception =>ex
348
+ if Bake.options.debug
349
+ puts ex.message
350
+ puts ex.backtrace
351
+ end
352
+ end
353
+ elsif (!@options.qacnoformat && line.start_with?("trc: ")) || (@options.qacnoformat && line.include?("): -->("))
354
+ # nothing to be done here
317
355
  else
318
- currentMessage = []
319
- linesOfFile[lineNum] = currentMessage
356
+ suppressLine = false
357
+ end
358
+
359
+ if (!suppressLine)
360
+ if linesOfFile.has_key?lineNum
361
+ currentMessage = linesOfFile[lineNum]
362
+ else
363
+ currentMessage = []
364
+ linesOfFile[lineNum] = currentMessage
365
+ end
366
+ currentMessage << line
320
367
  end
321
- currentMessage << line
322
368
  end
323
369
  end
324
370
  linesOfFile.sort.each { |lineNr, s| sortedLines += s }
@@ -327,7 +373,7 @@ $cmdRemoveLocks = qaExe + ["admin", "--qaf-project", @options.qacdata, "--remove
327
373
  numberOfMessages = 0
328
374
  sortedLines.each do |line|
329
375
  success = true if line.include?"The specified project does not have any source files" # to proceed we assume that this is a valid scenario
330
- if (!@options.qacnoformat && line.start_with?("MSG: ")) || (@options.qacnoformat && line.include?(": Msg("))
376
+ if (!@options.qacnoformat && line.start_with?("MSG: ")) || (@options.qacnoformat && (line.include?(": Msg(") || line.include?(": Err(")))
331
377
  Bake.formatter.printWarning(line)
332
378
  if @options.qacdoc
333
379
  errorNumScan = line.scan(/[^\(]*\([^\(]*\([^:]*:(\d*)/)
data/lib/blocks/block.rb CHANGED
@@ -315,8 +315,10 @@ module Bake
315
315
  exceptionOccured = true
316
316
  rescue Bake::SystemCommandFailed => scf # normal compilation error
317
317
  rescue SystemExit => exSys
318
+ rescue AbortException => exSys
319
+ Bake::IDEInterface.instance.set_abort(true)
318
320
  rescue Exception => ex1
319
- if not Bake::IDEInterface.instance.get_abort
321
+ if !Bake::IDEInterface.instance.get_abort
320
322
  SyncOut.mutex.synchronize do
321
323
  Bake.formatter.printError("Error: #{ex1.message}")
322
324
  puts ex1.backtrace if Bake.options.debug
@@ -11,7 +11,10 @@ class ThreadOut
11
11
  if Thread.current[:stdout] then
12
12
  Thread.current[:stdout].write stuff
13
13
  else
14
- @out.write stuff
14
+ begin
15
+ @out.write stuff
16
+ rescue Exception
17
+ end
15
18
  end
16
19
  end
17
20
 
@@ -19,7 +22,10 @@ class ThreadOut
19
22
  if Thread.current[:stdout] then
20
23
  Thread.current[:stdout].puts stuff
21
24
  else
22
- @out.puts stuff
25
+ begin
26
+ @out.puts stuff
27
+ rescue Exception
28
+ end
23
29
  end
24
30
  end
25
31
 
@@ -27,7 +33,10 @@ class ThreadOut
27
33
  if Thread.current[:stdout] then
28
34
  Thread.current[:stdout].puts stuff
29
35
  else
30
- @out.print stuff
36
+ begin
37
+ @out.print stuff
38
+ rescue Exception
39
+ end
31
40
  end
32
41
  end
33
42
 
@@ -35,7 +44,10 @@ class ThreadOut
35
44
  if Thread.current[:stdout] then
36
45
  Thread.current[:stdout].flush
37
46
  else
38
- @out.flush
47
+ begin
48
+ @out.flush
49
+ rescue Exception
50
+ end
39
51
  end
40
52
  end
41
53
  end
@@ -1,7 +1,7 @@
1
1
  module Bake
2
2
  class Version
3
3
  def self.number
4
- "2.42.1"
4
+ "2.42.2"
5
5
  end
6
6
 
7
7
  def self.printBakeVersion(ry = "")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bake-toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.42.1
4
+ version: 2.42.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Schaal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-06 00:00:00.000000000 Z
11
+ date: 2017-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rtext