1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-09 16:32:39 +01:00
Commit graph

26 commits

Author SHA1 Message Date
Aviv Eyal
c3f0c0b0f7 Merge Phacility/master into phorge 2022-07-25 11:50:26 -07:00
epriestley
6136964093 Fix a PHP 8.1 strlen() issue with "mysql.pass" configuration
Summary:
Ref T13588. This configuration value may not be set.

Also fix an issue in `bin/storage` and whatever else I hit between now and this diff actually uploading.

Also fix a MySQLi report mode difference, beginning in PHP 8.1.

Also update a bunch of "static" property usage in Lisk.

Test Plan: Ran `bin/files ...` locally under PHP 8.1.

Maniphest Tasks: T13588

Differential Revision: https://secure.phabricator.com/D21744
2021-12-16 15:24:21 -08:00
ekubischta
69cb760921 Updated .arclint in Phorge to exclude package-lock.json from Aphlict setup
Summary:
Aphlict requires a machine generated `package-lock.json` that can trigger linters unnecessarily.

This revision excludes it from all linters

Test Plan:
**Testing**

```name="Fake Change to set off the linter""
diff --git a/support/aphlict/server/package-lock.json b/support/aphlict/server/package-lock.json
index 8af62ae233..a417725182 100644
--- a/support/aphlict/server/package-lock.json
+++ b/support/aphlict/server/package-lock.json
@@ -2,11 +2,12 @@
   "name": "aphlict-server",
   "requires": true,
   "lockfileVersion": 1,
+  "testing" : true,
   "dependencies": {
     "ws": {
       "version": "7.5.0",
       "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.0.tgz",
-      "integrity": "sha512-6ezXvzOZupqKj4jUqbQ9tXuJNo+BR2gU8fFRk3XCP3e0G6WT414u5ELe6Y0vtp7kmSJ3F7YWObSNr1ESsgi4vw=="
+      "integrity": "sha512-6ezXvzOZupqKj4jUqbQ9tXuJNo+BR2gU8fFRk3XCP3e0G6WT414u5ELe6Y0vtp7kmSJ3F7YWObSNr1ESsgasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfi4vw=="
     }
   }
 }
```

```name="arc lint results"
root@63c842bff39e:/srv/phorge/phorge# arc lint
>>> Lint for support/aphlict/server/package-lock.json:

   Warning  (TXT3) Line Too Long
    This line is 156 characters long, but the convention is 80 characters.

               7     "ws": {
               8       "version": "7.5.0",
               9       "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.0.tgz",
    >>>       10       "integrity": "sha512-6ezXvzOZupqKj4jUqbQ9tXuJNo+BR2gU8fFRk3XCP3e0G6WT414u5ELe6Y0vtp7kmSJ3F7YWObSNr1ESsgasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfi4vw=="
              11     }
              12   }
              13 }
root@63c842bff39e:/srv/phorge/phorge#
```

Updated change

```name="Change to .arclint"
diff --git a/.arclint b/.arclint
index f215d93fdc..ca89c601e4 100644
--- a/.arclint
+++ b/.arclint
@@ -2,7 +2,8 @@
   "exclude": [
     "(^externals/)",
     "(^webroot/rsrc/externals/(?!javelin/))",
-    "(/__tests__/data/)"
+    "(/__tests__/data/)",
+    "(^support/aphlict/server/package-lock.json)"
   ],
   "linters": {
     "chmod": {
```

```name="arc lint results"
root@63c842bff39e:/srv/phorge/phorge# arc lint
 OKAY  No lint messages.
root@63c842bff39e:/srv/phorge/phorge#
```

Reviewers: O1 Blessed Committers, deadalnix, eax, speck

Reviewed By: O1 Blessed Committers, deadalnix, eax, speck

Subscribers: speck, tobiaswiese

Maniphest Tasks: T15021

Differential Revision: https://we.phorge.it/D25012
2021-06-26 15:48:55 +00:00
epriestley
f9b3e3360b Continue moving classes with no callers in libphutil or Arcanist to Phabricator
Summary: Ref T13395. Move cache classes, syntax highlighters, other markup classes, and sprite sheets to Phabricator.

Test Plan: Attempted to find any callers for any of this stuff in libphutil or Arcanist and couldn't.

Maniphest Tasks: T13395

Differential Revision: https://secure.phabricator.com/D20977
2020-02-12 13:14:04 -08:00
epriestley
9316cbf7fd Move web application classes into "phabricator/"
Summary: Ref T13395. Companion change to D20773.

Test Plan: See D20773.

Maniphest Tasks: T13395

Differential Revision: https://secure.phabricator.com/D20774
2019-09-02 07:58:59 -07:00
epriestley
d7cd2a9b9c Begin adding test coverage to GitHub Events API parsers
Summary:
Ref T10538.

This is a tiny fraction of the API. GitHub has 25 primary event types; we currently partially parse 3 of them. GitHub has 17 issue event types; we currently partially parse 12.

Test Plan: Ran `arc unit`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10538

Differential Revision: https://secure.phabricator.com/D15448
2016-03-09 09:30:07 -08:00
Joshua Spence
4e4ab36f06 Apply phutil XHPAST linter standard
Summary: Depends on D13867.

Test Plan: N/A

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14472
2015-11-13 07:09:12 +11:00
epriestley
ef731b42b7 Turn lint TODO comments back on
Summary:
These were accidentally disabled here:

https://secure.phabricator.com/diffusion/P/change/master/.arclint;36e2d02d6ec5db26f4dfc813a4f02238d18cc8a5

Test Plan: iiam

Reviewers: joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13029
2015-05-27 10:06:55 -07:00
Joshua Spence
36e2d02d6e phtize all the things
Summary: `pht`ize a whole bunch of strings in rP.

Test Plan: Intense eyeballing.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: hach-que, Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12797
2015-05-22 21:16:39 +10:00
Joshua Spence
2a2b47326c Fix text lint issues
Summary: Ref T5105. This is a proof-of-concept for D11458.

Test Plan: `arc lint --everything`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T5105

Differential Revision: https://secure.phabricator.com/D11642
2015-02-12 07:00:13 +11:00
Joshua Spence
4af3a37d6c Minor tightening of .arclint regexs
Summary: Self-explanatory.

Test Plan: Eyeball it.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11681
2015-02-10 06:54:35 +11:00
Joshua Spence
d0e4e96041 Lint the webroot/rsrc/externals/javelin directory
Summary: Fixes T6953. As discussed, this directory //should// be linted.

Test Plan: Ran `arc lint` on a file in `webroot/rsrc/externals/javelin` and saw linter errors.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6953

Differential Revision: https://secure.phabricator.com/D11375
2015-01-14 07:48:39 +11:00
Joshua Spence
ca0262ef6b Blacklist the use of eval()
Summary: Depends on D10686.

Test Plan: N/A

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11214
2015-01-05 10:52:33 +11:00
Joshua Spence
b6e0c76c7d Define a seperate JSHint configuration for NodeJS files
Summary: Currently, we assume that all JavaScript files are for use in a browser. This is not true for the NodeJS Aphlict server code. Split the current JSHint configuration into `jshint-browser` and `jshint-node`.

Test Plan: `arc lint`

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11071
2014-12-30 03:02:13 -08:00
epriestley
dbef5660fc Update the quickstart.sql
Summary:
Ref T1191. Use `storage quickstart` to regenerate `quickstart.sql` using modern schema construction statements.

This puts new installs into utf8mb4 mode immediately without requiring storage adjustment.

Test Plan:
  - Ran `arc unit --everything`, which uses quickstart.
  - Ran `bin/storage upgrade --namespace temp`, to quickstart a new namespace.
  - Ran `bin/storage upgrade --namespace temp --disable-utf8mb4`, to quickstart a new namespace without utf8mb4 support.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10797
2014-11-07 12:29:24 -08:00
Joshua Spence
023dee0d3b Rename Conduit classes
Summary: Ref T5655. Rename Conduit classes and provide a `getAPIMethodName` method to declare the API method.

Test Plan:
```
> echo '{}' | arc --conduit-uri='http://phabricator.joshuaspence.com' call-conduit user.whoami
Waiting for JSON parameters on stdin...
{"error":null,"errorMessage":null,"response":{"phid":"PHID-USER-lioqffnwn6y475mu5ndb","userName":"josh","realName":"Joshua Spence","image":"http:\/\/phabricator.joshuaspence.com\/res\/1404425321T\/phabricator\/3eb28cd9\/rsrc\/image\/avatar.png","uri":"http:\/\/phabricator.joshuaspence.com\/p\/josh\/","roles":["admin","verified","approved","activated"]}}
```

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin, hach-que

Maniphest Tasks: T5655

Differential Revision: https://secure.phabricator.com/D9991
2014-07-25 10:54:15 +10:00
Joshua Spence
13590b9e3d Rename the support/jshint directory.
Summary: It is somewhat overkill to use an entire directory for a single file (the configuration file for JSHint). Instead, rename the directory so that it could (theoretically) be used for other linter configuration files.

Test Plan: Ran `arc lint -- webroot/rsrc/js/core/phtize.js` just to make sure everything still works.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9944
2014-07-16 22:07:55 +10:00
Joshua Spence
5d91b2f0aa Minor fixes for .arclint file
Summary:
Minor fixes for the `.arclint` file. Specifically:

- Don't explicitly lint excluded paths (they are already excluded globally)
- Set the `xhpast.php-version` and `xhpast.php-version.windows` configuration (this should have been done in D9593, but wasn't)
- Sort `.arclint` linters alpahbetically

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9803
2014-07-03 11:55:43 +10:00
Joshua Spence
464979302b Fix line lengths in documentation and lint *.book files as JSON.
Summary: Fix a few "line too long" lint issues in the Diviner documentation. Also lint `*.book` files as JSON.

Test Plan: Eye-ball it.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9695
2014-06-24 04:26:06 +10:00
Joshua Spence
294f2bf118 Don't lint /webroot/rsrc/externals/.
Summary: If I understand correctly, the `/webroot/rsrc/externals/` directory should be treated similarly to `/externals/` in terms of linting and coding style.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9689
2014-06-24 03:23:49 +10:00
Joshua Spence
e0191750cc Lint JSON files with ArcanistJSONLinter.
Summary: After D9628, we can lint JSON files natively.

Test Plan: See D9652.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9654
2014-06-23 01:55:42 +10:00
Joshua Spence
ee2563c620 Modernize .arclint file.
Summary:
Update the `.arclint` file after D9576, D9590 and D9112.

Depends on D9576, D9590.

Test Plan: Eyeball it.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9593
2014-06-18 02:59:16 +10:00
epriestley
8dafabbb1d Restore test-sensitive whitespace to some test cases
Summary: This trailing whitespace is meaningful for these files. Also, exclude test data from linting.

Test Plan: Ran unit tests.

Reviewers: hach-que, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9462
2014-06-10 16:39:16 -07:00
Joshua Spence
54071cdd23 Use the ArcanistChmodLinter.
Summary: Apply the `ArcanistChmodLinter` from D9187.

Test Plan: Removed all other linters from the `.arclint` file and executed `arc lint --everything`. Confirmed that there were no issues raised.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9188
2014-05-18 18:09:33 -07:00
epriestley
23487dc357 Update .arclint in Phabricator for phutil-library lint
Summary:
Also fix a few other minor issues:

  - Use lint config.
  - Fix a method signature from `arc unit --everything` (unrelated).
  - Add a javelin doc.

Test Plan: Ran `arc lint`, `arc unit`, `arc linters`.

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9072
2014-05-12 06:01:30 -07:00
Joshua Spence
566f8ab9aa Use the ArcanistConfigurationDrivenLintEngine as a linting engine.
Summary:
Ref T2039. This diff is the equivalent to D9057, but for rP.

Depends on D9066.

Test Plan: Ran `arc lint` and ensure it doesn't complain about the `.arclint` file.

Reviewers: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T2039

Differential Revision: https://secure.phabricator.com/D9064
2014-05-12 04:47:25 -07:00