diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-11-09 12:17:40 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-11-09 12:17:40 +0100 |
commit | 2f4df753041088d788d1923692a7d530167a6840 (patch) | |
tree | 1e9e73cdfac07172e6cac1081f2997d06245801d /doc | |
parent | 5c856a69231eb1505df2ae1bf67199fd83f05a5e (diff) | |
download | Shaarli-2f4df753041088d788d1923692a7d530167a6840.tar.gz Shaarli-2f4df753041088d788d1923692a7d530167a6840.tar.zst Shaarli-2f4df753041088d788d1923692a7d530167a6840.zip |
Update Static Analysis documentation
Diffstat (limited to 'doc')
-rw-r--r-- | doc/md/dev/Development.md | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/md/dev/Development.md b/doc/md/dev/Development.md index 5c085e03..c42e8ffe 100644 --- a/doc/md/dev/Development.md +++ b/doc/md/dev/Development.md | |||
@@ -6,7 +6,7 @@ Please read [Contributing to Shaarli](https://github.com/shaarli/Shaarli/tree/ma | |||
6 | 6 | ||
7 | 7 | ||
8 | - [Unit tests](Unit-tests) | 8 | - [Unit tests](Unit-tests) |
9 | - Javascript linting - Shaarli uses [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript). | 9 | - Javascript linting - Shaarli uses [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript). |
10 | Run `make eslint` to check JS style. | 10 | Run `make eslint` to check JS style. |
11 | - [GnuPG signature](GnuPG-signature) for tags/releases | 11 | - [GnuPG signature](GnuPG-signature) for tags/releases |
12 | 12 | ||
@@ -51,12 +51,12 @@ PHP (managed through [`composer.json`](https://github.com/shaarli/Shaarli/blob/m | |||
51 | 51 | ||
52 | ## Link structure | 52 | ## Link structure |
53 | 53 | ||
54 | Every link available through the `LinkDB` object is represented as an array | 54 | Every link available through the `LinkDB` object is represented as an array |
55 | containing the following fields: | 55 | containing the following fields: |
56 | 56 | ||
57 | * `id` (integer): Unique identifier. | 57 | * `id` (integer): Unique identifier. |
58 | * `title` (string): Title of the link. | 58 | * `title` (string): Title of the link. |
59 | * `url` (string): URL of the link. Used for displayable links (without redirector, url encoding, etc.). | 59 | * `url` (string): URL of the link. Used for displayable links (without redirector, url encoding, etc.). |
60 | Can be absolute or relative for Notes. | 60 | Can be absolute or relative for Notes. |
61 | * `real_url` (string): Real destination URL, can be redirected, encoded, etc. | 61 | * `real_url` (string): Real destination URL, can be redirected, encoded, etc. |
62 | * `shorturl` (string): Permalink small hash. | 62 | * `shorturl` (string): Permalink small hash. |
@@ -66,7 +66,7 @@ containing the following fields: | |||
66 | * `thumbnail` (string|boolean): relative path of the thumbnail cache file, or false if there isn't any. | 66 | * `thumbnail` (string|boolean): relative path of the thumbnail cache file, or false if there isn't any. |
67 | * `created` (DateTime): link creation date time. | 67 | * `created` (DateTime): link creation date time. |
68 | * `updated` (DateTime): last modification date time. | 68 | * `updated` (DateTime): last modification date time. |
69 | 69 | ||
70 | Small hashes are used to make a link to an entry in Shaarli. They are unique: the date of the item (eg. `20110923_150523`) is hashed with CRC32, then converted to base64 and some characters are replaced. They are always 6 characters longs and use only `A-Z a-z 0-9 - _` and `@`. | 70 | Small hashes are used to make a link to an entry in Shaarli. They are unique: the date of the item (eg. `20110923_150523`) is hashed with CRC32, then converted to base64 and some characters are replaced. They are always 6 characters longs and use only `A-Z a-z 0-9 - _` and `@`. |
71 | 71 | ||
72 | 72 | ||
@@ -163,11 +163,13 @@ See [`.travis.yml`](https://github.com/shaarli/Shaarli/blob/master/.travis.yml). | |||
163 | 163 | ||
164 | ## Static analysis | 164 | ## Static analysis |
165 | 165 | ||
166 | Patches should try to stick to the [PHP Standard Recommendations](http://www.php-fig.org/psr/) (PSR), especially: | 166 | Patches should try to stick to the [PHP Standard Recommendations](http://www.php-fig.org/psr/) (PSR), and must follow: |
167 | 167 | ||
168 | - [PSR-1](http://www.php-fig.org/psr/psr-1/) - Basic Coding Standard | 168 | - [PSR-1](http://www.php-fig.org/psr/psr-1/) - Basic Coding Standard |
169 | - [PSR-2](http://www.php-fig.org/psr/psr-2/) - Coding Style Guide | 169 | - [PSR-2](http://www.php-fig.org/psr/psr-2/) - Coding Style Guide |
170 | - [PSR-12](http://www.php-fig.org/psr/psr-12/) - Extended Coding Style Guide | ||
170 | 171 | ||
172 | These are enforced on pull requests using our Continuous Integration tools. | ||
171 | 173 | ||
172 | **Work in progress:** Static analysis is currently being discussed here: in [#95 - Fix coding style (static analysis)](https://github.com/shaarli/Shaarli/issues/95), [#130 - Continuous Integration tools & features](https://github.com/shaarli/Shaarli/issues/130) | 174 | **Work in progress:** Static analysis is currently being discussed here: in [#95 - Fix coding style (static analysis)](https://github.com/shaarli/Shaarli/issues/95), [#130 - Continuous Integration tools & features](https://github.com/shaarli/Shaarli/issues/130) |
173 | 175 | ||