Do not use reserved name as a prefix, as WordPress will interpret the file as a specialised template, meant to apply to only one page on your site. Found %s
If we find a template file - meaning file that contains Template Name: Example template comment but in a file that has reserved template file name in it, an error should be thrown that would notify the user not to do this, as his/her template won't be a reusable template, but used only on one page.
[For new sniffs only] Code Samples:
Error: File name points to a page template, but the intended use is contact page template
Rule:
Ref: https://developer.wordpress.org/themes/template-files-section/page-template-files/#creating-custom-page-templates-for-global-use
Theme check file covering this rule:
None
Notes for implementation:
Based on this list: https://developer.wordpress.org/themes/basics/template-files/#common-wordpress-template-files
If we find a template file - meaning file that contains
Template Name: Example template
comment but in a file that has reserved template file name in it, an error should be thrown that would notify the user not to do this, as his/her template won't be a reusable template, but used only on one page.[For new sniffs only] Code Samples:
Error: File name points to a page template, but the intended use is contact page template
OK: File name is some custom name, but is a template because of the Template Name comment
To do:
sniffname
sniff to the ruleset.