-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnlsa1d15.aru
69 lines (67 loc) · 3.1 KB
/
nlsa1d15.aru
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
------------------------------------------------------------------------------
-- Copyright (c) 2021, Lev Kujawski.
--
-- Permission is hereby granted, free of charge, to any person obtaining a
-- copy of this software and associated documentation files (the "Software")
-- to deal in the Software without restriction, including without limitation
-- the rights to use, copy, modify, merge, publish, distribute, sublicense,
-- and sell copies of the Software, and to permit persons to whom the
-- Software is furnished to do so.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-- THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-- DEALINGS IN THE SOFTWARE.
--
-- SPDX-License-Identifier: MIT-0
--
-- File: nlsa1d15.aru
-- Language: AdaControl
-- Author: Lev Kujawski
-- Description: AdaControl rules for version 1.15
------------------------------------------------------------------------------
-- OLD RULES ---------------------------------------------------------------
-- The following rules are specific to older releases of AdaControl:
check style (positional_association, instantiation);
-- COMMON ------------------------------------------------------------------
-- The following rules are shared are common between releases of AdaControl:
check abnormal_function_return;
check allocators;
-- Forbid empty "when others"
check case_statement (others_span, min 1);
-- Forbid non-ASCII
check characters;
-- Require a unit name comment when there are intervening subprograms
check comments (unnamed_begin, declaration package);
check comments (unnamed_begin, program_unit function);
check comments (unnamed_begin, program_unit procedure);
-- Forbid access types, child units, exceptions, unsubtyped arrays, tasks
Exception_Rule: check declarations (exception);
check declarations (access_type, child_unit, single_array, task);
check declarations (multiple_names);
check directly_accessed_globals;
check expressions (universal_range);
check insufficient_parameters (1, standard.boolean);
check local_hiding (strict);
check max_line_length (78);
check naming_convention (type, case_sensitive "_T$", case_sensitive "T");
check parameter_aliasing (unlikely);
check simplifiable_expressions;
check simplifiable_statements
(block, dead, handler, if, if_for_case, if_not, loop, loop_for_while,
nested_path, null);
check statements (goto);
check statements (unnamed_exit);
check style (casing_keyword, lowercase);
check style (compound_statement);
check style (default_in);
check style (multiple_elements);
check style (negative_condition);
check style (no_closing_name);
Parameter_Rule: check style (parameter_order);
set tag1 "!";
check unnecessary_use_clause (unused, qualified, operator, nested, movable);
check with_clauses (multiple_names, reduceable);