mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	lint: Check for absolute/relative link style in developer docs.
This should help avoid a pretty wide range of link bugs we've had in the past.
This commit is contained in:
		@@ -595,7 +595,16 @@ def build_custom_checkers(by_lang):
 | 
			
		||||
    ]
 | 
			
		||||
    markdown_rules = markdown_whitespace_rules + prose_style_rules + [
 | 
			
		||||
        {'pattern': '\[(?P<url>[^\]]+)\]\((?P=url)\)',
 | 
			
		||||
         'description': 'Linkified markdown URLs should use cleaner <http://example.com> syntax.'}
 | 
			
		||||
         'description': 'Linkified markdown URLs should use cleaner <http://example.com> syntax.'},
 | 
			
		||||
        {'pattern': 'https://zulip.readthedocs.io/en/latest/[a-zA-Z0-9]',
 | 
			
		||||
         'exclude': ['docs/overview/contributing.md', 'docs/overview/readme-symlink.md'],
 | 
			
		||||
         'include_only': set(['docs']),
 | 
			
		||||
         'description': "Use relatve links (../foo/bar.html) to other documents in docs/",
 | 
			
		||||
         },
 | 
			
		||||
        {'pattern': '\][(][^#h]',
 | 
			
		||||
         'include_only': set(['README.md', 'CONTRIBUTING.md']),
 | 
			
		||||
         'description': "Use absolute links from docs served by GitHub",
 | 
			
		||||
         },
 | 
			
		||||
    ]
 | 
			
		||||
    help_markdown_rules = markdown_rules + [
 | 
			
		||||
        {'pattern': '[a-z][.][A-Z]',
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user