Skip to content

Commit

Permalink
Don't check links.md in lessons that use remote theme
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-belkin authored Apr 14, 2021
1 parent 4b3d44a commit 4df5052
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bin/lesson_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ def main():
if life_cycle == "pre-alpha":
args.permissive = True
check_source_rmd(args.reporter, args.source_dir, args.parser)
args.references = read_references(args.reporter, args.reference_path)

args.references = {}
if not using_remote_theme():
args.references = read_references(args.reporter, args.reference_path)

docs = read_all_markdown(args.source_dir, args.parser)
check_fileset(args.source_dir, args.reporter, list(docs.keys()))
Expand Down Expand Up @@ -167,6 +170,10 @@ def parse_args():

return args

def using_remote_theme():
config_file = os.path.join(source_dir, '_config.yml')
config = load_yaml(config_file)
return 'remote_theme' in config

def check_config(reporter, source_dir):
"""Check configuration file."""
Expand Down Expand Up @@ -493,7 +500,8 @@ def check(self):
"""Run extra tests."""

super().check()
self.check_reference_inclusion()
if not using_remote_theme():
self.check_reference_inclusion()

def check_metadata(self):
super().check_metadata()
Expand Down

0 comments on commit 4df5052

Please sign in to comment.