-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stops empty ToC block appearing when no headings to link to are found. #40
Conversation
…. Adds undeclared dependencies. Adds test for TocBlock.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, we've not got the default github workflows tests running yet, so worth running phpcs locally.
Just did and there are a few coding standards things to fix:
finn@Oobuntoo:~/sites/l.localgov/MY_PROJECT$ lando phpcs web/modules/contrib/localgov_publications/
............................................EE...W.E.. 54 / 54 (100%)
FILE: ...les/contrib/localgov_publications/localgov_publications.info.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
14 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...trib/localgov_publications/tests/src/Functional/TocBlockTest.php
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------
33 | ERROR | [x] Missing function doc comment
48 | ERROR | [x] There must be exactly one blank line before the
| | tags in a doc comment
74 | ERROR | [x] Expected 1 blank line after function; 0 found
75 | ERROR | [x] The closing brace for the class must have an empty
| | line before it
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...dules/contrib/localgov_publications/localgov_publications.module
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
44 | WARNING | Line exceeds 80 characters; contains 82 characters
----------------------------------------------------------------------
FILE: ...ules/contrib/localgov_publications/localgov_publications.install
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 801ms; Memory: 12MB
config/optional/block.block.localgov_publications_toc_block.yml
Outdated
Show resolved
Hide resolved
The block visibility does work though, so thanks, for this! 😺 |
I've merged 1.x in here with the proper CI pipeline setup, so we should see the tests pass in a bit... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks @rupertj 😄
Fixes #37.