Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create user guide for the viewer server #865

Merged
merged 1 commit into from
Oct 9, 2017

Conversation

csordasmarton
Copy link
Contributor

Closes #737

@whisperity whisperity added this to the 6.0 pre4 milestone Sep 1, 2017
@whisperity whisperity added enhancement 🌟 documentation 📖 Changes to documentation. WIP 💣 Work In Progress labels Sep 1, 2017
Copy link
Contributor

@whisperity whisperity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Information is an uncountable word. Meta informations is thus grammatically incorrect.

On review_status_message.png (Damn GitHub, why can't I inline (in-pixel?) annotate images?!?!) I'd rather write Review status details instead of "meta" and "actual".

this.userguide = new ContentPane({
title : 'User guide',
closable : true,
href : 'userguide/doc/html/userguide.html',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this handle if the user guide is missing because it failed to generate? The build script only issues a warning in this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the user guide is missing, dojo will handle it:
userguide_missing

<span class="customIcon severity-low"></span> | Low | **TODO** | _deadcode.DeadStores, misc-unused-parameters, etc._ |
<span class="customIcon severity-medium"></span> | Medium | **TODO** | _unix.Malloc, core.uninitialized.Assign, etc._ |
<span class="customIcon severity-high"></span> | High | **TODO** | _core.DivideZero, core.NullDereference, cplusplus.NewDelete, etc._ |
<span class="customIcon severity-critical"></span> | Critical | **TODO** | **TODO** |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these TODOs intentional or just oversight?

@@ -700,6 +700,11 @@ def build_package(repository_root, build_package_config, env=None):
target = os.path.join(package_root, package_layout['www'])
copy_tree(source, target)

# Run doxygen.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we call doxygen here? It is called in the Makefile

gen-docs: build_dir

@@ -0,0 +1,12 @@
PROJECT_NAME = "CodeChecker"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't we use the top level Doxyfile?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The top level Doxygen file uses doxygen own header and footer files. This way the html file which the doxygen was generated looks like this:
cc_doxygen
It contains extra style sheets and javascript files. If I'm opening the user guide in the CodeChecker, I'm getting a 404 error because these files doesn't exists in the web root directory.
This is the reason why I used a separate Doxygen file.

@@ -0,0 +1,271 @@
.doxgen { font:400 14px/22px Roboto,sans-serif;background-color:#FFF;color:#000;margin:0; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this file checked in? This was generated by doxygen right?

@csordasmarton csordasmarton changed the base branch from version6 to master September 5, 2017 08:11
@dkrupp dkrupp modified the milestones: 6.0 pre4, 6.0.1 Sep 18, 2017
@gyorb gyorb removed this from the release 6.0.1 milestone Sep 21, 2017
\tableofcontents

**CodeChecker** is a static analysis infrastructure built on the [LLVM/Clang
Static Analyzer](http://clang-analyzer.llvm.org) toolchain, replacing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is CodeChecker really going to replace scan-build, or is it an alternative tool with much more functionalities? And if it really replaces scan-build, will the user guide reader know what scan-build was originally?

You can delete multiple runs by selecting them and clicking on the Delete
button. It will remove the run and all related data from the database.

\subsection run_order Reorder runs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Sorting runs"

[`scan-build`](http://clang-analyzer.llvm.org/scan-build.html) in a Linux or
macOS (OS X) development environment.

\section list_of_runs List of runs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should write about these concepts. It may not be completely intuitive what a product or run (update mode, etc.) is. However I think the description of these should go to another user guide, because if the user is already on the web interface then he or she is done with storing results to a run.

![Report navigation tree](images/userguide/report_navigation_tree.png)

\subsection button_pane Button pane
Button Pane contains several items which helps you to change or get some
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"... which help you ..."

![Checker documentation](images/userguide/checker_documentation.png)

\subsubsection review_status Review status
Reports can be assigned a review status of Unreviewed, Confirmed bug, False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reports or bugs can be assigned a review status (detection status, comment, etc.)? If this information belongs to a bug then what is the connection between the bugs and reports? (unique mode)

to something else in the report details view above the file view.
![Unreviewed](images/userguide/review_status_unreviewed.png)

If you changed the review status, you can optionally explain the reason why do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"... why you changed it ..."

![Change review status](images/userguide/review_status_change.png)

If somebody has already changed the review status from the default one, you can
see extra informations (who changed the review status, when and why) beside
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"information" has no plural.

If somebody has already changed the review status from the default one, you can
see extra informations (who changed the review status, when and why) beside
the review status selector by hovering on the message icon. This message icon is
hided by default if nobody has changed the review status.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"hidden"

![Review status message](images/userguide/review_status_message.png)

\subsection bug_path_view Bug path view
Bug path shows the path of the actual report.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is a path? A few words about symbolic execution, bug path and bug event?

@bruntib
Copy link
Contributor

bruntib commented Sep 25, 2017

Maybe it would be a good idea to extend this documentation based on the "release notes" description: https://github.com/Ericsson/codechecker/releases/tag/v6.0.


After enabling the administrative actions in the top right corner, click
*Add new product*, then fill the form presented. The values that need to be
filled here are the same as the arguments for `CodeChecker cmd products add`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also mention that these buttons are visible only for the super user.

\subsection userguide_managing_products Managing products
![Products](images/userguide/products.png)

After enabling the administrative actions in the top right corner, click
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do "administrative actions" mean? This term is used several times in the text without its meaning being defined.

\subsection Managing permissions
* Server-wide permissions can be edited by clicking *Edit global permissions*.
* Product-level permissions can be edited by clicking the edit icon for the
product you want to configure the permissions for.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"for" is already there before "the product".

Clicking *OK* will save the changes to the database.

\section list_of_runs List of runs
List page contains the analysis runs available on the server.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"... on the server under the selected product."

![Same reports](images/userguide/same_reports.png)

\subsection userguide_bug_path_view Bug path view
Bug path shows the path of the actual report.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Some checkers are able to follow the execution path along the control flow of the program. If a bug appears on any of these paths then CodeChecker is able to present the full path on which this so called symbolic execution reached the place of error. This path can be checked in this bug path view."

@whisperity
Copy link
Contributor

Can't send review-like comments from phone.

Perhaps, considering the Web client user guide contains information about the product system, @csordasmarton could you please introduce a button next to the Show administration one visible to everyone, having some Dojo-standard ? icon on the product homepage which also opens the user guide? (If possible with a HTML anchor, at the product-specific parts?)

@whisperity
Copy link
Contributor

Actually, I think it's even better if the whole of the "main menu" is moved to a separate module and the users are able to use the whole menu (credits, report bug shortcut, etc.) on the product homepage too.

@@ -19,6 +19,7 @@
'fonts',
'images',
'scripts',
'userguide',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep an alphabetical order here, it makes maintaining stuff easier.

@csordasmarton csordasmarton force-pushed the user_guide branch 4 times, most recently from ce73a5c to 31593e8 Compare October 4, 2017 11:08
@csordasmarton
Copy link
Contributor Author

I rewrote the userguide.md file by using md file rules. This way the github will show this file contant in a better way.

For more information see:
https://github.com/csordasmarton/codechecker/blob/user_guide/www/userguide/userguide.md

@whisperity
Copy link
Contributor

On the image that explains the BugViewer.js features (not the layout, but the features), there is a seemingly dangling CHECKER ID arrow that points to... the CodeChecker version in the web page header.

@csordasmarton
Copy link
Contributor Author

That's points to the checker name. Maybe that wasn't a good idea to name it to CHECKER ID. I renamed it to CHECKER NAME.

copy_tree(source, target, [userguide_images])
copy_tree(userguide_images, os.path.join(target, 'images'))

# Run doxygen.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A separate make file target would be better, or please extend the current docs target to generate html from the markdown.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree here. Even if it requires a separate Doxyfile to exist. Also, the build_script.py does not run in parallel, while make can make the build distributed if multiple threads are allowed. (Not that documentation generation should be paralellised so much, I know.)

@whisperity
Copy link
Contributor

@csordasmarton www/userguide/images/bug_view.png:
image

Copy link
Contributor

@whisperity whisperity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read through the guide and also ran language checking tools on it.


## <a name="userguide-filter-runs"></a> Filter runs
You can filter runs by run name using the input box above the run list table.
The filter is working **case insensitive** and doing an **infix search**. If we
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filter is working case insensitive.

Perhaps infix search should be rephrased to substring matching?

## <a name="userguide-filter-runs"></a> Filter runs
You can filter runs by run name using the input box above the run list table.
The filter is working **case insensitive** and doing an **infix search**. If we
start typing some keyword in this input box, the list are being _filtered
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a keyword? Maybe some phrase or name part˛?


The list are is automatically filtered as we type in.


## <a name="userguide-sorting-runs"></a> Sorting runs
It is possible to change the order of the runs by clicking on a cell at header
of the run list table. For example you can sort the run list by the number of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example, (needs a comma afterwards)

reports with the given detection status to check only *Unresolved*, *Resolved*,
etc. reports.
- [**Severity**](#userguide-severity-levels): The nature of the bugs is sorted
in different severity levels. For example a division by zero or a null pointer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example here too.

- **Detection date**: A date interval can also restrict the list of displayed
bug reports. In this field you can choose the date of detection or fixing.
- **File**: You can choose a set of files to restrict the list of bug reports.
- **Checker name**: If you are instrested in specific type of bugs then here you
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instrested -> interested

- **Baseline**: The runs against which you want to check the difference.
- **Newcheck**: The runs which you want to compare against the baseline runs.
- **Diff type**: Here you can set if you'd like to see the bugs which appear
only in the baseline, newcheck or both.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would format baseline and newcheck as baseline or as baseline (monospace or italic)

Reports can be assigned a review status of Unreviewed, Confirmed bug, False
positive, Intentional, along with an optional comment on why this status was
applied.
- <span class="customIcon review-status-unreviewed"></span> **Unreviewed**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space between > and *.


## <a name="userguide-bug-path-view"></a> Bug path view
Some checkers are able to follow the execution path along the control flow of
the program. If a bug appears on any of these paths then CodeChecker is able to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the spellchecker: "If your sentence begins with a condition, insert a comma in front of the independent clause."

So a , between paths and then.

Copy link
Contributor

@whisperity whisperity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, I really like this guide to be available at a fingertip. ❤️

We just now need to make sure to keep this up-to-date too, when the UI changes.

Two concerns I have apart from the specifics discussed earlier:

  • The original SVGs for the images should be retained somehow, so that edits can be made easily later on.

  • I would also somehow put a very generic phrase, with > as a prefix (Markdown quote syntax), at the beginning of the in-browser user guide, which directly links to GitHub. Something along the lines of More descriptions and guides available [on GitHub](http://github.com/...). The text is just provisionary, but somehow I think it would be nice if the "one-shot user" (a member of a programmer team who does not really know how to use the analyzer part of CodeChecker) would see that this tool is capable not just to present results (even though that is one of the main and most developed part as of now). So just some sort of a handrail... "Hey, this website is cool, but you can run the analysis yourself, read more here!". Something like this.

Copy link
Contributor

@whisperity whisperity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did the image I posted about earlier intentionally disappear?

@@ -0,0 +1,9 @@
all: userguide

# pack binary
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comments in these files are useless, and derailing. Why is this called Makefile.manual instead of just simply Makefile?

@csordasmarton
Copy link
Contributor Author

@whisperity I removed that image because we didn't use that anywhere.

doxygen ./Doxyfile

clean:
rm -rf $(BUILD_DIR)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this variable is what you intend it to be? Is this variable even defined to a proper value? Look at how Makefile chains in api are laid out!

@bruntib bruntib merged commit 43685be into Ericsson:master Oct 9, 2017
@csordasmarton csordasmarton deleted the user_guide branch October 13, 2017 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📖 Changes to documentation. enhancement 🌟 WIP 💣 Work In Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants