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

Contents of /branches/eth/eve/Src/framework/code_analysis/rules/ca_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: 1656 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_RULE}."
3 author: ""
4 date: "$Date$"
5 revision: "$Revision$"
6
7 deferred class
8 CA_RULE
9
10 inherit
11 CA_SHARED_NAMES
12
13 feature -- Basic properties, usually fix
14
15 title: STRING
16 deferred
17 end
18
19 id: detachable STRING
20 -- A preferrably unique identifier for the rule. It should start with "CA".
21 once
22 Result := Void
23 end
24
25 description: STRING
26 deferred
27 end
28
29 options: LINKED_LIST[CA_RULE_OPTION[ANY]]
30 deferred
31 end
32
33 is_system_wide: BOOLEAN
34 -- Only check the rule if a system wide analysis is performed.
35 deferred
36 end
37
38 checks_library_classes: BOOLEAN
39 once
40 Result := True
41 end
42
43 checks_nonlibrary_classes: BOOLEAN
44 once
45 Result := True
46 end
47
48 feature {CA_RULE_VIOLATION} -- formatted rule checking output
49
50 format_violation_description (a_violation: CA_RULE_VIOLATION; a_formatter: TEXT_FORMATTER)
51 require
52 violation_belongs_to_rule: violations.has (a_violation)
53 deferred
54 end
55
56 feature -- Properties the user can change
57
58 is_enabled: BOOLEAN
59
60 enable
61 do
62 is_enabled := True
63 ensure
64 is_enabled
65 end
66
67 disable
68 do
69 is_enabled := False
70 ensure
71 not is_enabled
72 end
73
74 severity: CA_RULE_SEVERITY
75
76 set_severity (a_severity: CA_RULE_SEVERITY)
77 do
78 severity := a_severity
79 end
80
81 feature -- Rule checking
82
83 set_checking_class (a_class: CLASS_C)
84 do
85 checking_class := a_class
86 end
87
88 checking_class: detachable CLASS_C
89
90 feature -- Results
91
92 frozen clear_violations
93 do
94 violations.wipe_out
95 end
96
97 violations: LINKED_LIST[CA_RULE_VIOLATION]
98
99 feature {NONE} -- Implementation
100
101 invariant
102 checks_some_classes: checks_library_classes or checks_nonlibrary_classes
103 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23