diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4a5eab..9bc1e43 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python: ['3.8', '3.9', '3.10', '3.11'] fail-fast: false permissions: @@ -40,9 +40,10 @@ jobs: run: | cd test find . -name '*.html' -exec rm {} \; - make html SPHINXOPTS='-W' + make html SPHINXOPTS='-W' | tee log.txt (cd _build/html && rm genindex.html index.html search.html php-modindex.html) (cd _build/html && find . -name '*.html' -exec sh -c 'xmllint {} --xpath '"'"'//div[@role="main"]'"'"' | xmllint --format - > ../../{}' \;) + sed -i -r 's~.*/(test/.* \[phpdomain)~\1~;t;d' log.txt - name: Diff Unit Tests Output run: | diff --git a/sphinxcontrib/phpdomain.py b/sphinxcontrib/phpdomain.py index 068f98b..d49c204 100644 --- a/sphinxcontrib/phpdomain.py +++ b/sphinxcontrib/phpdomain.py @@ -30,7 +30,7 @@ def log_info( message: str ): logger = logging.getLogger(__name__) - logger.info(f"[phpdomain] {message}", location=fromdocnode) + logger.info(f"[phpdomain.info] {message}", location=fromdocnode) # log messages that should fail CI def log_warning( @@ -38,7 +38,7 @@ def log_warning( message: str ): logger = logging.getLogger(__name__) - logger.warning(f"[phpdomain] {message}", location=fromdocnode) + logger.warning(f"[phpdomain.warning] {message}", location=fromdocnode) # log assertions that should fail CI def log_assert( @@ -48,7 +48,7 @@ def log_assert( if not value: caller = inspect.getframeinfo(inspect.stack()[1][0]) logger = logging.getLogger(__name__) - logger.warning(f"[phpdomain-assert] line {caller.lineno}", location=fromdocnode) + logger.warning(f"[phpdomain.assert] line {caller.lineno}", location=fromdocnode) php_sig_re = re.compile( r'''^ (public\ |protected\ |private\ )? # visibility diff --git a/test/log.txt b/test/log.txt new file mode 100644 index 0000000..30f2478 --- /dev/null +++ b/test/log.txt @@ -0,0 +1,27 @@ +test/method.md:11: [phpdomain.info] Target not found 'Foo\array' +test/ns.md:48: [phpdomain.info] Target not found 'A2::simplify' +test/ns.md:53: [phpdomain.info] Target not found 'Bar2\A::simplify' +test/rst_doc.md:24: [phpdomain.info] Target not found 'array' +test/rst_doc.md:27: [phpdomain.info] Target not found 'boolean' +test/rst_doc.md:40: [phpdomain.info] Target not found 'DateTime\int' +test/rst_doc.md:40: [phpdomain.info] Target not found 'DateTime\int' +test/rst_doc.md:40: [phpdomain.info] Target not found 'DateTime\int' +test/rst_doc.md:48: [phpdomain.info] Target not found 'DateTime\int' +test/rst_doc.md:48: [phpdomain.info] Target not found 'DateTime\int' +test/rst_doc.md:48: [phpdomain.info] Target not found 'DateTime\int' +test/rst_doc.md:104: [phpdomain.info] Target not found 'DateTimeInterface\int' +test/rst_doc.md:104: [phpdomain.info] Target not found 'DateTimeInterface\int' +test/rst_doc.md:104: [phpdomain.info] Target not found 'DateTimeInterface\int' +test/rst_doc.md:112: [phpdomain.info] Target not found 'DateTimeInterface\int' +test/rst_doc.md:112: [phpdomain.info] Target not found 'DateTimeInterface\int' +test/rst_doc.md:112: [phpdomain.info] Target not found 'DateTimeInterface\int' +test/rst_doc.md:221: [phpdomain.info] Target not found 'LibraryName\string' +test/rst_doc.md:221: [phpdomain.info] Target not found 'LibraryName\string' +test/rst_doc.md:497: [phpdomain.info] Target not found 'OtherLibrary\ReturningClass\string' +test/rst_doc.md:502: [phpdomain.info] Target not found 'OtherLibrary\ReturningClass\int|string|OtherLibrary\ReturnedClass|LibraryName\SubPackage\SubpackageInterface|null' +test/rst_doc2.md:11: [phpdomain.info] Target not found 'Imagine\Draw\ImagineImageImageInterface::draw' +test/rst_doc2.md:17: [phpdomain.info] Target not found 'Imagine\Draw\DrawerInterface\ImagineImagePointInterface' +test/rst_doc2.md:17: [phpdomain.info] Target not found 'Imagine\Draw\DrawerInterface\ImagineImageBoxInterface' +test/rst_doc2.md:17: [phpdomain.info] Target not found 'Imagine\Draw\DrawerInterface\integer' +test/rst_doc2.md:17: [phpdomain.info] Target not found 'Imagine\Draw\DrawerInterface\integer' +test/rst_doc2.md:17: [phpdomain.info] Target not found 'Imagine\Draw\DrawerInterface\ImagineImageColor'