Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-jams
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-jams
Commits
d0d7d2fc
Commit
d0d7d2fc
authored
1 year ago
by
Léo Banno-Cloutier
Browse files
Options
Downloads
Patches
Plain Diff
README.md: add documentation about google-java-format
Change-Id: Ic23158eddf6b0497a3243408a3413ae0a8ceb929
parent
490493b2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+28
-3
28 additions, 3 deletions
README.md
extras/scripts/pre-commit
+2
-0
2 additions, 0 deletions
extras/scripts/pre-commit
with
30 additions
and
3 deletions
README.md
+
28
−
3
View file @
d0d7d2fc
...
...
@@ -30,14 +30,39 @@ Where the `pem` and `key` files are a pem encoded certificate and key.
## How to generate server.pem and server.key pair
In order to generate a pair of pem and key use the following command using openssl
In order to generate a pair of pem and key use the following command using openssl
.
`openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout server.key -out server.pem`
Note that a self signed certificate will be rejected from opendht,
QNetworkAccessManager and other curl-like program by default. The following
changes should disable those checks.
```
diff
// opendht/src/http.cpp void Request::connect
- conn_->set_ssl_verification(get_url().host, asio::ssl::verify_peer | asio::ssl::verify_fail_if_no_peer_cert);
+ conn_->set_ssl_verification(get_url().host, asio::ssl::verify_none);
```
```
cpp
// jami-client-qt/src/app/networkmanager.cpp NetworkManager::NetworkManager
QSslConfiguration
sslConfig
=
QSslConfiguration
::
defaultConfiguration
();
sslConfig
.
setPeerVerifyMode
(
QSslSocket
::
VerifyNone
);
QSslConfiguration
::
setDefaultConfiguration
(
sslConfig
);
```
## Run with the debugger enabled
`java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=localhost:35000 -jar jams-server.jar 8080`
## Format java file
The code was formatted using
[
google-java-format
](
https://github.com/google/google-java-format
)
using the following command:
`google-java-format -i -a --skip-reflowing-long-strings --skip-javadoc-formatting **/*.java `
## Generate documentation
To generate the documentation you will need
`apidoc`
installed on your system.
...
...
@@ -53,8 +78,8 @@ You can then open `doc/index.html`. Click on 1.0.0 in the top right corner if th
## Pre-commit hook
The
`extras`
folder contains a pre-commit hook that formats every js
file in
`jams-react-client`
. To enable it, run:
The
`extras`
folder contains a pre-commit hook that formats every js
and java
file
. To enable it, run:
```
sh
cp
extras/scripts/pre-commit .git/hooks
chmod
+x .git/hooks/pre-commit
...
...
This diff is collapsed.
Click to expand it.
extras/scripts/pre-commit
+
2
−
0
View file @
d0d7d2fc
...
...
@@ -2,3 +2,5 @@
cd
jams-react-client
npm run format
google-java-format
-i
-a
**
/
*
.java
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment