-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbeginning_development.html
335 lines (283 loc) · 13.4 KB
/
beginning_development.html
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 2.0.0 from src/site/xdoc/beginning_development.xml at 2025-04-02
| Rendered using Apache Maven Fluido Skin 2.0.1
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="generator" content="Apache Maven Doxia Site Renderer 2.0.0" />
<title>Beginning Development – checkstyle</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-2.0.1.min.css" />
<link rel="stylesheet" href="./css/site.css" />
<link rel="stylesheet" href="./css/print.css" media="print" />
<script src="./js/apache-maven-fluido-2.0.1.min.js"></script>
<script type="text/javascript" src="./js/checkstyle.js"></script>
<script type="text/javascript" src="./js/anchors.js"></script>
<script type="text/javascript" src="./js/google-analytics.js"></script>
<script type="text/javascript" src="./js/copy-clipboard.js"></script>
<link rel="icon" href="./images/favicon.png" type="image/x-icon" />
<link rel="shortcut icon" href="./images/favicon.ico" type="image/ico" />
</head>
<body>
<div class="container-fluid container-fluid-top">
<header>
<div id="banner">
<div class="pull-left"><div id="bannerLeft"><h1><a href="./"><img class="class java.lang.Object" src="images/header-checkstyle-logo.png" alt="Checkstyle" /></a></h1></div></div>
<div class="pull-right"><div id="bannerRight"><h1><img class="class java.lang.Object" src="images/header-right-ruller.png" alt="Checkstyle" /></h1></div></div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 2025-04-02</li>
<li id="projectVersion" class="pull-right"><span class="divider">|</span>Version: 10.23.0</li>
<li class="pull-right"><a>toTop</a></li>
</ul>
</div>
</header>
<div class="row-fluid">
<header id="leftColumn" class="span2">
<nav class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">About</li>
<li><a href="index.html">Checkstyle</a></li>
<li><a href="releasenotes.html">Release Notes</a></li>
<li><a href="consulting.html">Consulting</a></li>
<li><a href="sponsoring.html">Sponsoring</a></li>
<li class="nav-header">Documentation</li>
<li><a href="config.html"><span class="icon-chevron-down"></span>Configuration</a>
<ul class="nav nav-list">
<li><a href="property_types.html">Property Types</a></li>
<li><a href="config_system_properties.html">System Properties</a></li>
</ul></li>
<li><a href="running.html"><span class="icon-chevron-down"></span>Running</a>
<ul class="nav nav-list">
<li><a href="anttask.html">Ant Task</a></li>
<li><a href="cmdline.html">Command Line</a></li>
</ul></li>
<li><a href="checks.html"><span class="icon-chevron-down"></span>Checks</a>
<ul class="nav nav-list">
<li><a href="checks/annotation/index.html"><span class="icon-chevron-right"></span>Annotations</a></li>
<li><a href="checks/blocks/index.html"><span class="icon-chevron-right"></span>Block Checks</a></li>
<li><a href="checks/design/index.html"><span class="icon-chevron-right"></span>Class Design</a></li>
<li><a href="checks/coding/index.html"><span class="icon-chevron-right"></span>Coding</a></li>
<li><a href="checks/header/index.html"><span class="icon-chevron-right"></span>Headers</a></li>
<li><a href="checks/imports/index.html"><span class="icon-chevron-right"></span>Imports</a></li>
<li><a href="checks/javadoc/index.html"><span class="icon-chevron-right"></span>Javadoc Comments</a></li>
<li><a href="checks/metrics/index.html"><span class="icon-chevron-right"></span>Metrics</a></li>
<li><a href="checks/misc/index.html"><span class="icon-chevron-right"></span>Miscellaneous</a></li>
<li><a href="checks/modifier/index.html"><span class="icon-chevron-right"></span>Modifiers</a></li>
<li><a href="checks/naming/index.html"><span class="icon-chevron-right"></span>Naming Conventions</a></li>
<li><a href="checks/regexp/index.html"><span class="icon-chevron-right"></span>Regexp</a></li>
<li><a href="checks/sizes/index.html"><span class="icon-chevron-right"></span>Size Violations</a></li>
<li><a href="checks/whitespace/index.html"><span class="icon-chevron-right"></span>Whitespace</a></li>
</ul></li>
<li><a href="filters/index.html"><span class="icon-chevron-right"></span>Filters</a></li>
<li><a href="filefilters/index.html"><span class="icon-chevron-right"></span>File Filters</a></li>
<li><a href="style_configs.html"><span class="icon-chevron-down"></span>Style Configurations</a>
<ul class="nav nav-list">
<li><a href="google_style.html">Google's Style</a></li>
<li><a href="sun_style.html">Sun's Style</a></li>
</ul></li>
<li class="nav-header">Developers</li>
<li><a href="extending.html"><span class="icon-chevron-down"></span>Extending Checkstyle</a>
<ul class="nav nav-list">
<li><a href="writingchecks.html">Writing Checks</a></li>
<li><a href="writingjavadocchecks.html">Writing Javadoc Checks</a></li>
<li><a href="writingfilters.html">Writing Filters</a></li>
<li><a href="writingfilefilters.html">Writing File Filters</a></li>
<li><a href="writinglisteners.html">Writing Listeners</a></li>
</ul></li>
<li><a href="contributing.html">Contributing</a></li>
<li class="active"><a><span class="icon-chevron-down"></span>Beginning Development</a>
<ul class="nav nav-list">
<li><a href="eclipse.html">Eclipse IDE</a></li>
<li><a href="netbeans.html">NetBeans IDE</a></li>
<li><a href="idea.html">IntelliJ IDE</a></li>
</ul></li>
<li><a href="apidocs/index.html">Javadoc</a></li>
<li class="nav-header">Project Documentation</li>
<li><a href="project-info.html"><span class="icon-chevron-right"></span>Project Information</a></li>
<li><a href="project-reports.html"><span class="icon-chevron-right"></span>Project Reports</a></li>
</ul>
</nav>
<div class="well sidebar-nav">
<div id="poweredBy">
<div class="clear"></div>
<div class="clear"></div>
<a href="https://github.com/checkstyle/checkstyle" class="builtBy"><img class="builtBy" src="images/github_logo_social_coding_outlined.png" alt="GitHub" /></a>
<a href="https://twitter.com/checkstyle_java/" class="builtBy"><img class="builtBy" src="images/twitter_button.png" alt="Twitter" /></a>
<a href="https://stackoverflow.com/questions/tagged/checkstyle" class="builtBy"><img class="builtBy" src="images/stackoverflow.jpeg" alt="Stackoverflow" /></a>
<a href="https://groups.google.com/forum/#!forum/checkstyle" class="builtBy"><img class="builtBy" src="images/groups.png" alt="GoogleGroups" /></a>
<a href="https://www.ej-technologies.com/products/jprofiler/overview.html" class="builtBy"><img class="builtBy" src="https://www.ej-technologies.com/images/product_banners/jprofiler_medium.png" alt="JProfiler" /></a>
</div>
</div>
</header>
<main id="bodyColumn" class="span10">
<section><a id="Content"></a>
<h1>Content</h1>
<ul>
<li><a href="#Content">Content</a></li>
<li><a href="#Before_development">Before development</a></li>
<li><a href="#Starting_Development">Starting Development</a></li></ul>
</section>
<section><a id="Before_development"></a>
<h1>Before development</h1>
<p>
1. Ensure that Git, Java JDK >= 11 until JDK 17, maven >= 3.6.3 are installed.<br />
You can find information about development environment preparation here:
<a href="https://github.com/sevntu-checkstyle/sevntu.checkstyle/wiki/Prepare-Development-Environment-in-Ubuntu-12.04" class="externalLink">
Prepare development environment in Ubuntu</a>.<br />
2. Fork Checkstyle upstream project. As it is described
<a href="https://help.github.com/articles/fork-a-repo/" class="externalLink"> here</a><br />
3. Clone your forked repository to your computer:
</p>
<div class="wrap-content">
<div class="wrapper">
<pre class="prettyprint"><code class="language-xml">
git clone git@github.com:your_user_name/checkstyle.git
</code></pre></div>
</div>
<p>
4. Before opening project in IDE, build the project in your terminal to download<br />
all needed artifacts. From the repository root folder, run:
</p>
<div class="wrap-content">
<div class="wrapper">
<pre class="prettyprint"><code class="language-xml">
mvn install
</code></pre></div>
</div>
</section>
<section><a id="Starting_Development"></a>
<h1>Starting Development</h1>
<p>
Here you can find instructions about importing and debugging the project for IDEs:<br />
<a href="eclipse.html">Eclipse IDE</a><br />
<a href="netbeans.html">NetBeans IDE</a><br />
<a href="idea.html">IntelliJ IDEA IDE</a><br />
</p>
<p>
Community video walk throughs of these instructions are available in SteLeo1602's
<a href="https://www.youtube.com/playlist?list=PLHM9s_lN4X0hzOQ0sUmGdroxW0HfREAqj" class="externalLink">
playlist on YouTube.</a>
</p>
<p>
Follow these instructions of Git usage and creating a Pull Request:<br />
1) Configure remotes by pointing to the official checkstyle repository,<br />
naming it "upstream":
</p>
<div class="wrap-content">
<div class="wrapper">
<pre class="prettyprint"><code class="language-text">
git remote add upstream https://github.com/checkstyle/checkstyle
</code></pre></div>
</div>
<p>
2) Create a branch for a new check:
</p>
<div class="wrap-content">
<div class="wrapper">
<pre class="prettyprint"><code class="language-text">
git checkout -b my-new-check
</code></pre></div>
</div>
<p>
3) Commit changes to my-new-check branch:
</p>
<div class="wrap-content">
<div class="wrapper">
<pre class="prettyprint"><code class="language-text">
git add .
git commit -m "commit message"
</code></pre></div>
</div>
<p>
4) Push branch to GitHub, to allow your mentor to review your code:
</p>
<div class="wrap-content">
<div class="wrapper">
<pre class="prettyprint"><code class="language-text">
git push origin my-new-check
</code></pre></div>
</div>
<p>
5) Repeat steps 3-4 till development is complete<br />
All additional commits, please <a href="https://davidwalsh.name/squash-commits-git" class="externalLink">
squash to first</a>. Please read all rules for PullRequest at
our <a href="https://github.com/checkstyle/checkstyle/wiki/PR-rules" class="externalLink">wiki</a>.
</p>
<div class="wrap-content">
<div class="wrapper">
<pre class="prettyprint"><code class="language-text">
git rebase -i master
git push --force origin my-new-check
</code></pre></div>
</div>
<p>
6) Update current branch and local master by pulling changes that were done<br />
by other contributors:
</p>
<div class="wrap-content">
<div class="wrapper">
<pre class="prettyprint"><code class="language-text">
git checkout master
git pull upstream master
git push origin master
</code></pre></div>
</div>
<p>
7) Rebase your branch on your updated master:
</p>
<div class="wrap-content">
<div class="wrapper">
<pre class="prettyprint"><code class="language-text">
git checkout my-new-check
git rebase master
</code></pre></div>
</div>
<p>
8) In the process of the rebase, it may discover conflicts.<br />
In that case it will stop and allow you to fix the conflicts.<br />
After fixing conflicts, use
</p>
<div class="wrapper">
<pre class="prettyprint"><code class="language-text">
git add .
</code></pre></div>
<p> to update the index with those contents, and then just run:</p>
<div class="wrap-content">
<div class="wrapper">
<pre class="prettyprint"><code class="language-text">
git rebase --continue
</code></pre></div>
</div>
<p>
9) Push branch to GitHub (with all your final changes and actual code of Checkstyle):
</p>
<div class="wrap-content">
<div class="wrapper">
<pre class="prettyprint"><code class="language-text">
git push --force origin my-new-check
</code></pre></div>
</div>
<p>
10) Only after all content is finished and testing is done - send a
<a href="https://help.github.com/articles/using-pull-requests/" class="externalLink">Pull Request</a>
</p>
</section>
</main>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row-fluid">
<p>© 2001–2025
</p>
</div>
</div>
</footer>
</body>
</html>