1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-15 03:12:40 +01:00
Commit graph

15 commits

Author SHA1 Message Date
Joshua Spence
e0ee3e8a07 Capture maximum version information in php_compat_info.
Summary: Ref T5141. In order to be able to warn when deprecated functions are used, we need to be aware of from which version the functions were deprecated.

Test Plan: Ran `arc lint` and made sure no unexpected warnings were raised.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5141

Differential Revision: https://secure.phabricator.com/D9248
2014-05-22 09:22:36 -07:00
Joshua Spence
f13aa21b8e Capture a wider range of version information in php_compat_info.json.
Summary: Ref T5141. Currently, `php_compat_info.json` is hardcoded to support PHP 5.2.3. Instead, store as much version information as possible in `php_compat_info.json` and filter accordingly in `ArcanistXHPASTLinter.`

Test Plan: Ran `arc lint` and made sure no additional warnings were raised.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5141

Differential Revision: https://secure.phabricator.com/D9247
2014-05-22 09:14:14 -07:00
Joshua Spence
8274ffa44d Update PHP compatibility information.
Summary: Ref T5141. Generated using PHP v5.5.12 and PHP_CompatInfo v2.26.0.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5141

Differential Revision: https://secure.phabricator.com/D9236
2014-05-21 10:13:58 -07:00
epriestley
b6ccfd4ef5 Add some example .arclint files to un-lie the pending documentation
Summary: Ref T2039. Provide some examples to help users figure out how to write these things.

Test Plan: Checked them with `jsonlint`.

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T2039

Differential Revision: https://secure.phabricator.com/D9065
2014-05-11 20:22:57 -07:00
Joshua Spence
9fbf316d38 Various linter fixes
Summary:
Fixed various linter issues that were identified by running `arc lint --everything`.

- Removed trailing whitespace.
- Added newline at EOF.
- Added whitespace after `if` statement

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: aurelijus, Korvin, epriestley, aran

Differential Revision: https://secure.phabricator.com/D8337
2014-02-25 07:53:07 -08:00
Jakub Vrana
eb449a40b4 Update PHP compat info
Summary: Also warn against functions not available on Windows at all.

Test Plan: Compared old and new file.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5975
2013-05-22 11:36:41 -07:00
vrana
66d204be81 Delete license headers from files
Summary:
This commit doesn't change license of any file. It just makes the license implicit (inherited from LICENSE file in the root directory).

We are removing the headers for these reasons:

- It wastes space in editors, less code is visible in editor upon opening a file.
- It brings noise to diff of the first change of any file every year.
- It confuses Git file copy detection when creating small files.
- We don't have an explicit license header in other files (JS, CSS, images, documentation).
- Using license header in every file is not obligatory: http://www.apache.org/dev/apply-license.html#new.

This change is approved by Alma Chao (Lead Open Source and IP Counsel at Facebook).

Test Plan: Verified that the license survived only in unit tests and LICENSE file.

Reviewers: epriestley, btrahan, edward

Reviewed By: epriestley

CC: aran, Korvin, davidrecordon

Maniphest Tasks: T2035

Differential Revision: https://secure.phabricator.com/D3881
2012-11-05 11:16:24 -08:00
vrana
c8687a0c79 Lint functions not available on Windows on PHP 5.2
Summary: Also use absolute paths.

Test Plan: Linted Arcanist, libphutil, Phabricator, found no false positives and one real error in [[ https://secure.phabricator.com/diffusion/PHU/browse/master/src/channel/PhutilSocketChannel.php;42d8e8447c8b5d6a$92 | PhutilSocketChannel ]].

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3504
2012-09-17 13:51:06 -07:00
vrana
67c772d919 Warn about PHP 5.3 only functions and parameters
Test Plan:
Linted:

  json_decode('{}', true, 1, 1);
  gethostname();

Also linted all Phabricator repositories and found no occurrence.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1158

Differential Revision: https://secure.phabricator.com/D2806
2012-06-22 15:52:10 -07:00
epriestley
81976ff2ff Provide a simpler analyzer script for killing __init__.php
Summary:
The `phutil_analyzer.php` script currently analyzes entire modules and is fairly complex. We don't need or want this in a post-__init__.php world.

This is basically a simplified version of `phutil_analyzer.php`, which takes one file and emits symbols.

Test Plan:
```$ ./scripts/phutil_symbols.php resources/test/diverse_symbols.php
{
  "have" : {
    "function"  : {
      "f" : 348
    },
    "class"     : {
      "L"      : 308,
      "A"      : 497,
      "C"      : 509,
      "D"      : 531,
      "CLocal" : 627
    },
    "interface" : {
      "ILocal" : 593
    }
  },
  "need" : {
    "function"  : {
      "g" : 402,
      "h" : 462
    },
    "class"     : {
      "B"         : 519,
      "INonlocal" : 642,
      "U"         : 552,
      "X"         : 421,
      "V"         : 557,
      "W"         : 565,
      "P"         : 572
    },
    "interface" : {
      "IForeign" : 608
    }
  }
}```

Reviewers: vrana, nh, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1103

Differential Revision: https://secure.phabricator.com/D2561
2012-05-24 10:56:56 -07:00
epriestley
587368e9ea Remove git commit template from Arcanist
Summary: Out of date an no longer referenced.

Test Plan: Grepped for references.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D2387
2012-05-07 06:06:53 -07:00
Mark Lewandowski
0c7c52381d Add support for zsh completion to bash-completion 2012-01-09 11:52:51 -08:00
Chris Piro
2a78b2bffa bash completion: work around PHP CLI readline in command substitution
Summary: (At least my build of) PHP tries to do readline magic on the terminal
when invoked from the shell, even inside bash's command substitution operator.
Work around it by piping the output of ##echo## to ##php##, so the input isn't a
terminal.

Test Plan: ##bash$ arc li<TAB>## now gives me possible completions rather than
breaking and inserting a literal tab

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: 1096
2011-11-09 16:53:46 -08:00
epriestley
4818892841 Basic 'shell-complete' workflow.
Summary:
Adds data-driven shell completion help to arcanist.

Test Plan:
ran various commands in git and svn working copies,
output seemed reasonable

Differential Revision: 201754
Reviewed By: adonohue
Reviewers: mroch, adonohue
Commenters: crackerjack
CC: epriestley, adonohue, achao
Revert Plan:
OK
2011-01-17 20:18:27 -08:00
epriestley
7d54ecb885 Provide a git commit template.
Summary: adds a Differential-suitable git commit template.

Test Plan: meta

Reviewers:

CC:
2011-01-09 20:42:37 -08:00