Class: Gitlab::Ci::Reports::Security::Locations::Sast
- Includes:
- Concerns::FingerprintPathFromFile
- Defined in:
- lib/gitlab/ci/reports/security/locations/sast.rb
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#end_line ⇒ Object
readonly
Returns the value of attribute end_line.
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#method_name ⇒ Object
readonly
Returns the value of attribute method_name.
-
#start_line ⇒ Object
readonly
Returns the value of attribute start_line.
Instance Method Summary collapse
- #fingerprint_data ⇒ Object
-
#initialize(file_path:, start_line:, end_line: nil, class_name: nil, method_name: nil) ⇒ Sast
constructor
A new instance of Sast.
Methods included from Concerns::FingerprintPathFromFile
Methods inherited from Base
#==, #as_json, #fingerprint, #fingerprint_path
Constructor Details
#initialize(file_path:, start_line:, end_line: nil, class_name: nil, method_name: nil) ⇒ Sast
Returns a new instance of Sast.
17 18 19 20 21 22 23 |
# File 'lib/gitlab/ci/reports/security/locations/sast.rb', line 17 def initialize(file_path:, start_line:, end_line: nil, class_name: nil, method_name: nil) @class_name = class_name @end_line = end_line @file_path = file_path @method_name = method_name @start_line = start_line end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
11 12 13 |
# File 'lib/gitlab/ci/reports/security/locations/sast.rb', line 11 def class_name @class_name end |
#end_line ⇒ Object (readonly)
Returns the value of attribute end_line.
12 13 14 |
# File 'lib/gitlab/ci/reports/security/locations/sast.rb', line 12 def end_line @end_line end |
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
13 14 15 |
# File 'lib/gitlab/ci/reports/security/locations/sast.rb', line 13 def file_path @file_path end |
#method_name ⇒ Object (readonly)
Returns the value of attribute method_name.
14 15 16 |
# File 'lib/gitlab/ci/reports/security/locations/sast.rb', line 14 def method_name @method_name end |
#start_line ⇒ Object (readonly)
Returns the value of attribute start_line.
15 16 17 |
# File 'lib/gitlab/ci/reports/security/locations/sast.rb', line 15 def start_line @start_line end |
Instance Method Details
#fingerprint_data ⇒ Object
25 26 27 |
# File 'lib/gitlab/ci/reports/security/locations/sast.rb', line 25 def fingerprint_data "#{file_path}:#{start_line}:#{end_line}" end |