/[eiffelstudio]/branches/eth/eve/Src/framework/code_analysis/rules/ca_empty_if_rule.e
ViewVC logotype

Contents of /branches/eth/eve/Src/framework/code_analysis/rules/ca_empty_if_rule.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 93426 - (show annotations)
Tue Nov 19 08:45:14 2013 UTC (6 years ago) by zurfluhs
File size: 1225 byte(s)
Code Analysis: GUI:

- analysis options in class indexing clauses
  - rules that ignore class
  - library / nonlibrary classes
1 note
2 description: "Summary description for {CA_EMPTY_IF_RULE}."
3 author: ""
4 date: "$Date$"
5 revision: "$Revision$"
6
7 class
8 CA_EMPTY_IF_RULE
9
10 inherit
11 CA_STANDARD_RULE
12 redefine id end
13
14 create
15 make
16
17 feature {NONE} -- Initialization
18
19 make
20 do
21 is_enabled := True
22 create {CA_WARNING} severity
23 create violations.make
24 end
25
26 feature {NONE} -- Activation
27
28 register_actions (a_checker: CA_ALL_RULES_CHECKER)
29 do
30 a_checker.add_if_pre_action (agent process_if)
31 end
32
33 feature -- Properties
34
35 title: STRING
36 do
37 Result := ca_names.empty_if_title
38 end
39
40 id: STRING = "CA017T"
41 -- "T" stands for 'under test'.
42
43 description: STRING
44 do
45 Result := ca_names.empty_if_description
46 end
47
48 is_system_wide: BOOLEAN = False
49
50 options: LINKED_LIST[CA_RULE_OPTION[ANY]]
51 once
52 create Result.make
53 end
54
55 format_violation_description (a_violation: CA_RULE_VIOLATION; a_formatter: TEXT_FORMATTER)
56 do
57 -- TODO
58 end
59
60 feature {NONE} -- Rule Checking
61
62 process_if (a_if: IF_AS)
63 local
64 l_violation: CA_RULE_VIOLATION
65 do
66 if not attached a_if.compound then
67 create l_violation.make_with_rule (Current)
68 l_violation.set_location (a_if.start_location)
69 violations.extend (l_violation)
70 end
71 end
72
73 end

Properties

Name Value
svn:eol-style native
svn:keywords Author Date ID Revision

  ViewVC Help
Powered by ViewVC 1.1.23