Commit graph

8 commits

Author SHA1 Message Date
James D. Forrester 4a22815562 build: Upgrade eslint-config-wikimedia from 0.10.1 to 0.11.0
Change-Id: I691326c8fc35e0ccc7b7d0b19b586e68611baf88
2019-04-03 16:26:40 -07:00
Daimona Eaytoy 66c56f5c86 Migrate to new Phan
Bug: T216944
Change-Id: I5278ea60a17283dca6b0aee843ff60bf5c4103e2
2019-03-02 13:43:16 +01:00
Rafid Aslam 46700b5fdb Add phan configuration for static analysis and fix phan warnings
Add phan configuration for static analysis, and fix phan warnings.
`PhanDeprecatedClass` and `PhanDeprecatedFunction` rules are supressed.

Bug: T179554
Change-Id: I7cbb410ed88ba58198d0557cafd9e6df968ed885
2017-12-25 11:16:49 +07:00
Timo Tijhof f8b63304eb Support local composer setup
This makes installation easier for local development.
Per https://www.mediawiki.org/wiki/Manual:External_libraries

I was supicious about whether 'use KzykHys\Pygments\Pygments;'
works in a file if the namespace/class itself is only loaded
later, but it works fine.

Ref T103890.

Change-Id: Ia1a577f555cd8ab09969dec219316bc1e76769f4
2015-06-25 22:49:53 +00:00
Ori Livneh 6484894497 Highlight using Pygments rather than Geshi
GeSHi is unmaintained, lacks support for many popular modern languages, and
suffers from deep architectural flaws, chief among them the inconsistent
tokenization of different languages, each of which requires a custom
stylesheet.

Pygments is a well-maintained alternative. It is, by my count, the most popular
syntax highlighting library around. It is BSD-licensed, actively maintained,
and is widely used in PHP projects.

To keep this easy to review, this change does not include update for l10n
files, and it does not delete the geshi/ directory. I will do those in a
separate patch.

The chief change between this and the previous implementation is that errors
result in the code block not being highlighted, as opposed to not being printed
at all, having been replaced by an angry red error message. I think that is the
right user experience. If you go to StackOverflow or GitHub and try to mark up
your code block as being written in some language that their highlighter
doesn't know about, you don't get an error message -- the code simply doesn't
get highlighted.

Because we don't recursively load dependencies for extensions, to test this,
you will need to create a composer.local.json in $IP and add:

    {
        "extra": {
            "merge-plugin": {
                "include": [
                    "extensions/SyntaxHighlight_GeSHi/composer.json"
                ]
            }
        }
    }

Then run `composer update`.

Bug: T85794
Change-Id: I07446ec9893fae3d1e394f435d3d95cf8be6bc33
2015-06-22 23:37:15 +01:00
James D. Forrester 0f8b00c709 build: Use npm for repo testing (jshint, jsonlint, jscs, banana)
Add three qqq messages to make it pass.

Change-Id: I77166ad79d8ad1497032ca7e571258bfc1850037
2015-05-29 17:21:59 +00:00
Siebrand Mazeland c602c5a4a7 Maintenance for extension SyntaxHighlight_GeSHi.
* Use Message class where possible.
* Removed superflous newlines.
* Update .gitignore.

Change-Id: Ic2386183e240662331656ebadcaad1057569fb7c
2012-08-26 11:24:29 +02:00
Reedy f761411c20 Add .gitignore
Change-Id: I3369e8d13b36314dacfbe9793e30e8b5450ccfee
2012-05-21 01:48:34 +01:00