Sha256: 3697e917c9deb1c399836adb859404abb215710abdb4f0d655955db0de0dc8b3

Contents?: true

Size: 858 Bytes

Versions: 24

Compression:

Stored size: 858 Bytes

Contents

import sys

from pygments.lexers import get_all_lexers, find_lexer_class
from pygments.lexer import Lexer

def main():
    uses = {}

    for name, aliases, filenames, mimetypes in get_all_lexers():
        cls = find_lexer_class(name)
        for f in filenames:
            if f not in uses:
                uses[f] = []
            uses[f].append(cls)

    ret = 0
    for k, v in uses.iteritems():
        if len(v) > 1:
            #print "Multiple for", k, v
            for i in v:
                if i.analyse_text is None:
                    print i, "has a None analyse_text"
                    ret |= 1
                elif Lexer.analyse_text.__doc__ == i.analyse_text.__doc__:
                    print i, "needs analyse_text, multiple lexers for", k
                    ret |= 2
    return ret

if __name__ == '__main__':
    sys.exit(main())

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
gitlab-pygments.rb-0.3.2 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.3.7 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.3.6 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.3.5 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.3.4 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.3.3 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.3.2 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.3.1 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.3.0 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.2.13 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.2.12 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.2.11 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.2.10 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.2.9 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.2.8 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.2.7 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.2.6 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.2.4 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.2.3 vendor/pygments-main/scripts/detect_missing_analyse_text.py
pygments.rb-0.2.2 vendor/pygments-main/scripts/detect_missing_analyse_text.py