/[eiffelstudio]/branches/eth/eve/Src/Eiffel/interface/tty/ewb_code_analysis.e
ViewVC logotype

Contents of /branches/eth/eve/Src/Eiffel/interface/tty/ewb_code_analysis.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 93177 - (show annotations)
Mon Oct 28 22:16:38 2013 UTC (6 years, 3 months ago) by zurfluhs
File size: 3001 byte(s)
Code Analysis:

- formatted version of rule violation description
- refactorings and other minor changes
1 note
2 description: "Summary description for {EWB_CODE_ANALYSIS}."
3 author: "Stefan Zurfluh"
4 date: "$Date$"
5 revision: "$Revision$"
6
7 class
8 EWB_CODE_ANALYSIS
9
10 inherit
11 EWB_CMD
12
13 SHARED_SERVER
14 export {NONE} all end
15
16 create
17 make_with_arguments
18
19 feature {NONE} -- Initialization
20
21 make_with_arguments (a_arguments: LINKED_LIST [STRING])
22 -- Initialization for `Current'.
23 do
24
25 end
26
27 feature -- Execution (declared in EWB_CMD)
28
29 execute
30 -- UNDER TEST
31 local
32 l_code_analyzer: CA_CODE_ANALYZER
33 l_rule_name, l_line, l_col: STRING
34 do
35 output_window.add ("{EWB_CODE_ANALYSIS}.execute was called! (:%N")
36 output_window.add ("Creating a CA_CODE_ANALYZER instance...%N")
37 create l_code_analyzer.make
38 output_window.add ("Calling analyze_sytem...%N")
39 l_code_analyzer.add_whole_system
40 l_code_analyzer.analyze
41 print ("%N")
42
43 across l_code_analyzer.rule_violations as l_vlist loop
44
45 if not l_vlist.item.is_empty then
46 print ("%NIn class '" + l_vlist.key.name + "':%N")
47
48 -- Sort
49
50
51 across l_vlist.item as l_v loop
52 l_rule_name := l_v.item.rule.title
53 l_line := l_v.item.location.line.out
54 l_col := l_v.item.location.column.out
55
56 print (" (" + l_line + ":" + l_col + "): " + l_rule_name + ": " + "--FORMATTED LONG DESCR.--")
57 print ("%N")
58 end
59 end
60 end
61 end
62
63 feature -- Info (declared in EWB_CMD)
64
65 name: STRING
66 do
67 Result := "Code Analysis"
68 end
69
70 help_message: STRING_GENERAL
71 do
72 Result := "Code Analysis performs static analyses on the source code and %
73 %outputs a list of issues found according to a set of rules."
74 end
75
76 abbreviation: CHARACTER
77 do
78 Result := 'a'
79 end
80
81 note
82 copyright: "Copyright (c) 1984-2013, Eiffel Software"
83 license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
84 licensing_options: "http://www.eiffel.com/licensing"
85 copying: "[
86 This file is part of Eiffel Software's Eiffel Development Environment.
87
88 Eiffel Software's Eiffel Development Environment is free
89 software; you can redistribute it and/or modify it under
90 the terms of the GNU General Public License as published
91 by the Free Software Foundation, version 2 of the License
92 (available at the URL listed under "license" above).
93
94 Eiffel Software's Eiffel Development Environment is
95 distributed in the hope that it will be useful, but
96 WITHOUT ANY WARRANTY; without even the implied warranty
97 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
98 See the GNU General Public License for more details.
99
100 You should have received a copy of the GNU General Public
101 License along with Eiffel Software's Eiffel Development
102 Environment; if not, write to the Free Software Foundation,
103 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
104 ]"
105 source: "[
106 Eiffel Software
107 5949 Hollister Ave., Goleta, CA 93117 USA
108 Telephone 805-685-1006, Fax 805-685-6869
109 Website http://www.eiffel.com
110 Customer support http://support.eiffel.com
111 ]"
112 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23