Project

General

Profile

Code Style Guide » History » Version 1

Sergey Smolov, 11/13/2019 03:29 PM

1 1 Sergey Smolov
h1. Code Style Guide
2
3
In Verilog Translator project we use "Google Java Style Guide":https://google.github.io/styleguide/javaguide.html and "How to Write Doc Comments for the Javadoc Tool":http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html recommendations for Javadoc comments.
4
5
Also we start every Java class with the following license agreement (substitute "2019" with current year):
6
7
<pre><code class="java">
8
/*
9
 * Copyright 2019 ISP RAS (http://www.ispras.ru), UniTESK Lab (http://www.unitesk.com)
10
 *
11
 * Licensed under the Apache License, Version 2.0 (the "License");
12
 * you may not use this file except in compliance with the License.
13
 * You may obtain a copy of the License at
14
 *
15
 *     http://www.apache.org/licenses/LICENSE-2.0
16
 *
17
 * Unless required by applicable law or agreed to in writing, software
18
 * distributed under the License is distributed on an "AS IS" BASIS,
19
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
 * See the License for the specific language governing permissions and
21
 * limitations under the License.
22
 */
23
</code></pre>
24
25
26
The Javadoc header for class should contain the following author data:
27
28
<pre><code class="java">
29
/**
30
 * Class description.
31
 *
32
 * @author <a href="mailto:ivanov@mail.ru">Ivan Ivanov</a>
33
 */
34
</code></pre>