Skip to content

Commit 36e8972

Browse files
author
Ryuichi Saito
committed
Merge pull request #16 from ryuichis/master
Catch up documents for 0.10.1
2 parents 6a8b024 + 7cb8ce7 commit 36e8972

34 files changed

+758
-524
lines changed

_theme/oclintdocs/layout.html

+4-5
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<a href='http://oclint.org/news.html'>News</a>
6161
</li>
6262
<li>
63-
<a href='http://oclint.org/downloads.html'>Downloads</a>
63+
<a href='https://github.com/oclint/oclint/releases'>Downloads</a>
6464
</li>
6565
<li>
6666
<a href='{{ pathto('index') }}'>Documentation</a>
@@ -80,9 +80,6 @@ <h2 class='muted'>OCLint</h2>
8080
{% block body %}{% endblock %}
8181
</div>
8282
<div class='span3'>
83-
<div class="alert sidebar-module">
84-
<p>This is the documentation for the development version of OCLint, see the <a href="http://oclint.org/releases.html">Releases</a> page for released documentations.</p>
85-
</div>
8683
<div class="well sidebar-nav">
8784
{%- if pagename != "search" %}
8885
<div id="searchbox" style="display: none">
@@ -130,7 +127,9 @@ <h3>Navigation</h3>
130127
</div>
131128
<hr />
132129
<div class='footer'>
133-
OCLint {{ release }} Documentation &copy; 2010-2013 <a href='http://www.longyiqi.com/' target='_BLANK'>Longyi Qi</a>. All Rights Reserved.
130+
OCLint {{ release }} Documentation is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.
131+
<br />
132+
Maintained by <a href="http://www.ryuichisaito.com/?ref=oclint">Ryuichi Saito</a>.
134133
{%- if show_sphinx %}
135134
{% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}<br/>
136135
{%- endif %}

conf.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@
4141

4242
# General information about the project.
4343
project = u'OCLint'
44-
copyright = u'Longyi Qi'
44+
copyright = u'Longyi Qi, Ryuichi Saito'
4545

4646
# The version info for the project you're documenting, acts as replacement for
4747
# |version| and |release|, also used in various other places throughout the
4848
# built documents.
4949
#
5050
# The short X.Y version.
51-
version = '0.8'
51+
version = '0.10'
5252
# The full version, including alpha/beta/rc tags.
53-
release = '0.8dev'
53+
release = '0.10.1'
5454

5555
# The language for content autogenerated by Sphinx. Refer to documentation
5656
# for a list of supported languages.
@@ -184,7 +184,7 @@
184184
# (source start file, target name, title, author, documentclass [howto/manual]).
185185
latex_documents = [
186186
('contents', 'OCLint.tex', u'OCLint Documentation',
187-
u'Longyi Qi', 'manual'),
187+
u'Longyi Qi, Ryuichi Saito', 'manual'),
188188
]
189189

190190
# The name of an image file (relative to this directory) to place at the top of
@@ -214,7 +214,7 @@
214214
# (source start file, name, description, authors, manual section).
215215
man_pages = [
216216
('contents', 'oclint', u'OCLint Documentation',
217-
[u'Longyi Qi'], 1)
217+
[u'Longyi Qi, Ryuichi Saito'], 1)
218218
]
219219

220220
# If true, show URL addresses after external links.
@@ -228,7 +228,7 @@
228228
# dir menu entry, description, category)
229229
texinfo_documents = [
230230
('contents', 'OCLint', u'OCLint Documentation',
231-
u'Longyi Qi', 'OCLint', 'One line description of project.',
231+
u'Longyi Qi, Ryuichi Saito', 'OCLint', 'One line description of project.',
232232
'Miscellaneous'),
233233
]
234234

@@ -246,9 +246,9 @@
246246

247247
# Bibliographic Dublin Core info.
248248
epub_title = u'OCLint ' + release + ' Documentation'
249-
epub_author = u'Longyi Qi'
250-
epub_publisher = u'Longyi Qi'
251-
epub_copyright = u'Longyi Qi'
249+
epub_author = u'Longyi Qi, Ryuichi Saito'
250+
epub_publisher = u'Longyi Qi, Ryuichi Saito'
251+
epub_copyright = u'Longyi Qi, Ryuichi Saito'
252252

253253
# The language of the text. It defaults to the language option
254254
# or en if the language is not set.

contents.rst

-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ OCLint Documentation Contents
99
manual/index
1010
guide/index
1111
howto/index
12-
customizing/index
1312
rules/index
1413
internals/index
1514
devel/index
16-
devel/releasenotes
1715
devel/license

customizing/index.rst

-8
This file was deleted.

customizing/rules.rst

-41
This file was deleted.

devel/checkout.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ In addition, ``clang`` script does more than that:
6060
* Second, you can check out a branch codebase other than the trunk codebase by ``./clang checkout -branch <branch_name>``
6161

6262
googletest/googlemock
63-
--------------------
63+
---------------------
6464

6565
Google C++ Testing and Mocking Frameworks are used for testing OCLint. OCLint follows `Test Driven Development <http://en.wikipedia.org/wiki/Test-driven_development>`_ (TDD), so checkout them before we work on this codebase and want to make sure the modifications do not break the other pieces of code.
6666

devel/license.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Modified BSD License
22
====================
33

4-
Copyright (C) 2010-2013 Longyi Qi. All rights reserved.
4+
Copyright (C) 2010-2013 Longyi Qi, 2015 Ryuichi Saito, LLC. All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
77

devel/openings.rst

+19-84
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
Open Projects
22
=============
33

4-
This page contains a TODO list in a large picture. You can understand it as a road map. Some of them are small, but some are infinitely big. Implementation schedule of these projects are very flexible, we also release partial progress of some big projects if they look good and provide benefits to users.
4+
This page shows the the roadmap of this project. We warmly welcome all sorts of contributions. Please use `oclint-dev mailing list <https://groups.google.com/group/oclint-dev>`_ for the best discussion channel, and use it for more ideas and suggestions.
5+
6+
.. seealso::
7+
8+
Tasks in the pipeline, under discussion and being implemented can be found at `GitHub Issues <https://github.com/oclint/oclint/issues>`_ page.
59

6-
OCLint started as a research project, so in addition to the features that are designed for industrial usage, there are some projects here that could be very interesting research projects in their own right. Users can leverage the research results for higher accuracy, better performance, more reasonable software metrics, and so on.
710

8-
In any case, we welcome all contributions. If you are thinking one of them, please send an email to `oclint-dev mailing list <https://groups.google.com/group/oclint-dev>`_, so that we know this is being worked on. Please use the same mailing list to suggest more projects to this page.
911

1012
More Rules
1113
----------
@@ -24,11 +26,6 @@ More interesting metrics can help developers measure their source code in differ
2426

2527
OCLint's metrics module is actually a cohesive library, it can be reused in your project without any OCLint dependencies. So, the new introduced metrics should only depend on abstract syntax tree representation.
2628

27-
Better Build System
28-
-------------------
29-
30-
Using bash scripts to organize the build system is not as good as letting the build system handles this by itself. We already use CMake in every modules, so now, we need to figure out a way to let CMake handle all projects under the OCLint umbrella.
31-
3229
Package Manager Build
3330
---------------------
3431

@@ -39,85 +36,23 @@ Xcode Plugin/Addon/Extension
3936

4037
We are happy with existing `oclint-xcodebuild <../guide/oclint-xcodebuild.html>`_, but we also want to provide a graphic interface for Xcode users. The idea is either being a Xcode plugin to be able to invoke OCLint inside Xcode, or being a standalone extension to open a Xcode workspace/project, select scheme, target, and other settings, then show source code with inline analysis results.
4138

42-
Control Flow Graphic Engine
43-
---------------------------
39+
Research Interests
40+
------------------
4441

45-
A strong control flow graphic engine can help with a better understand of the order that statements, expressions, and functions are evaluated or executed. For instance, goto statements force program to jump to a different statement, if statements execute a branch of statements only if certain conditions are met, while statements run the code inside a loop iteratively, etc. It helps increase the analysis accuracy and avoid false positives.
46-
47-
We have applied control flow analysis in some existing rules, but we would like to have an engine to gain a more comprehensive understanding of the source code.
42+
OCLint started as a research project, so some ideas here can be explored much more with critical thinking. In addition, the tool can continue leveraging the research conclusions for higher accuracy, better performance, more reasonable software metrics, and so on.
4843

44+
Source Code Metrics
45+
More metrics could be explored and benefit the quality of source code.
46+
Control Flow Graphic Engine
47+
A strong control flow graphic engine can help with a better understand of the order that statements, expressions, and functions are evaluated or executed. For instance, goto statements force program to jump to a different statement, if statements execute a branch of statements only if certain conditions are met, while statements run the code inside a loop iteratively, etc. It helps increase the analysis accuracy and avoid false positives. We have applied control flow analysis in some existing rules, but we would like to have an engine to gain a more comprehensive understanding of the source code.
4948
Data Flow Engine
50-
----------------
51-
52-
Data flow provides global information about how a procedure manipulates its data, such as the use, declaration and dependency of the data. For example, a new value could be assigned to an existing variable, and the memory address of a pointer can be reallocated.
53-
54-
It is easier to detect the data flow in runtime. However, certain dynamic behaviors of the data can be also determined in static code analysis with data flow engine. Data flow engine is a big supplement to control flow engine.
55-
56-
Code Duplication and Logic Duplication Detection
57-
------------------------------------------------
58-
59-
We hope to apply `Rabin–Karp string search algorithm <http://en.wikipedia.org/wiki/Rabin%E2%80%93Karp_string_search_algorithm>`_ in code duplication detection.
60-
61-
When it comes to logic duplication detection, there are many interesting experiments that we can conduct. But first of all, your humbled author has to admit that currently I don't have a complete definition of logic duplication. But let's think about the following interesting case:
62-
63-
Let's say, 20 years ago, long before I join my current company, a senior developer had written a method like this
64-
65-
.. code-block:: c++
66-
67-
void foo(int x, int y)
68-
{
69-
cout << x - y;
70-
cout << x * y;
71-
}
72-
73-
And 10 years ago, he left the company. But his code is still in a base level library.
74-
75-
I joined this company after my graduation from college, 10 years after he left the company, so almost all my teammates even don't know the existence of the method above. And one day, I occasionally write something like this
76-
77-
.. code-block:: c++
78-
79-
void bar()
80-
{
81-
cout << 1 + 2;
82-
cout << 1 - 2;
83-
cout << 1 * 2;
84-
cout << 1 / 2;
85-
}
86-
87-
Now, in this case, I really hope to be informed that I can change my code to
88-
89-
.. code-block:: c++
90-
91-
void bar()
92-
{
93-
cout << 1 + 2;
94-
foo(1, 2);
95-
cout << 1 / 2;
96-
}
97-
98-
This might not be a perfect example, but I hope you can feel a little bit about the meaning of ``logic duplication`` here. This is a valuable feature to many organizations that have to maintain large codebase, especially with many legacy code. In order to find out the logic duplication in the early stage of development can truly help them reduce the high maintenance in the future.
99-
49+
Data flow provides global information about how a procedure manipulates its data, such as the use, declaration and dependency of the data. For example, a new value could be assigned to an existing variable, and the memory address of a pointer can be reallocated. It is easier to detect the data flow in runtime. However, certain dynamic behaviors of the data can be also determined in static code analysis with data flow engine. Data flow engine is a big supplement to control flow engine.
50+
Code Duplication Detection
51+
Duplicated code is problematic, the command text-based duplication detection could be highly improved with source code logic based duplication detection.
10052
Refactoring Suggestions
101-
-----------------------
102-
103-
In addition to detecting code defects that break our defined rule set, we hope to provide you suggestions of how to improve your code by refactoring. We hope to do it smartly and intelligently that the suggestions will be given after fully analyzing the context of the rot code.
104-
105-
Design Patterns Extraction
106-
--------------------------
107-
108-
It's helpful to know the design patterns we have applied in our codebase.
109-
53+
In addition to detecting code defects that break our defined rule set, we hope to provide you suggestions of how to improve your code by refactoring. We hope to do it smartly and intelligently that the suggestions will be given after fully analyzing the context of the rot code.
54+
Design Patterns Recognition
55+
It's helpful to know the design patterns we have applied in our codebase.
11056
Type Inference
111-
--------------
112-
113-
We know we can sometimes cheat to let compilers happy with certain things. This is a very dangerous practice.
114-
115-
But, on the other hand, sometimes, we also want to take the advantages of the dynamic of programming languages, like void pointer in C and C++, and ``id`` in Objective-C, even though they are static typed languages.
116-
117-
In fact, we believe type inference, the technique of automatically deduce, either partially or fully, the type even at compile time.
118-
119-
However, this largely increase the false positive in static code analysis.
120-
121-
Luckily, as the development of programming language techniques, type inference is introduced as a technique to automatically deduce, either partially or fully, the type of an expression at compile time. Many static typed languages have type inference capabilities builtin nowadays, so that as a developer, even though it's a static typed language, but you could omit the type annotations without explicitly telling the compiler the type.
57+
We know we can sometimes cheat to let compilers happy with certain things. This is a very dangerous practice. But, on the other hand, sometimes, we also want to take the advantages of the dynamic of programming languages, like void pointer in C and C++, and ``id`` in Objective-C, even though they are static typed languages. In fact, we believe type inference, the technique of automatically deduce, either partially or fully, the type even at compile time. However, this largely increase the false positive in static code analysis. Luckily, as the development of programming language techniques, type inference is introduced as a technique to automatically deduce, either partially or fully, the type of an expression at compile time. Many static typed languages have type inference capabilities builtin nowadays, so that as a developer, even though it's a static typed language, but you could omit the type annotations without explicitly telling the compiler the type. In this case, we can apply the same technique in static code analysis in order to lower false positive, and improve the accuracy at the same time.
12258

123-
In this case, we can apply the same technique in static code analysis in order to lower false positive, and improve the accuracy at the same time.

0 commit comments

Comments
 (0)