build-doc: verify that there are no github readme links

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-08-25 00:00:00 +00:00
parent 96239298a9
commit 9524307c0d
8 changed files with 26 additions and 7 deletions

View File

@@ -15,7 +15,7 @@ _exit:
LKMC_M5OPS_EXIT_ASM LKMC_M5OPS_EXIT_ASM
#else #else
/* Use semihosting: /* Use semihosting:
* https://github.com/cirosantilli/linux-kernel-module-cheat#semihosting */ * https://cirosantilli.com/linux-kernel-module-cheat#semihosting */
#if defined(__arm__) #if defined(__arm__)
mov r0, #0x18 mov r0, #0x18
ldr r1, =#0x20026 ldr r1, =#0x20026

View File

@@ -56,6 +56,24 @@ from the README to example sources to GitHub rather than locally.
self.log_error('broken link to local file: ' + link) self.log_error('broken link to local file: ' + link)
exit_status = 1 exit_status = 1
# Check that there are not links to the GitHub README.
# https://github.com/isaacs/github/issues/1610
for grep_line in self.sh.check_output(
[
'git',
'grep',
'--fixed-strings',
self.env['github_repo_url'] + '#',
LF
],
cwd=self.env['root_dir'],
raise_on_failure=False
).decode().splitlines():
self.log_error('link to GitHub readme: {}'.format(
grep_line
))
exit_status = 1
# Check that non-README links to README IDs exit. # Check that non-README links to README IDs exit.
header_ids = set() header_ids = set()
grep_line_location_re = re.compile('^(.*?:\d+):') grep_line_location_re = re.compile('^(.*?:\d+):')

View File

@@ -102,6 +102,7 @@ consts['sha'] = common.git_sha(consts['root_dir'])
consts['release_dir'] = os.path.join(consts['out_dir'], 'release') consts['release_dir'] = os.path.join(consts['out_dir'], 'release')
consts['release_zip_file'] = os.path.join(consts['release_dir'], 'lkmc-{}.zip'.format(consts['sha'])) consts['release_zip_file'] = os.path.join(consts['release_dir'], 'lkmc-{}.zip'.format(consts['sha']))
consts['github_repo_id'] = 'cirosantilli/linux-kernel-module-cheat' consts['github_repo_id'] = 'cirosantilli/linux-kernel-module-cheat'
consts['github_repo_url'] = 'https://github.com/' + consts['github_repo_id']
consts['homepage_url'] = 'https://cirosantilli.com/linux-kernel-module-cheat' consts['homepage_url'] = 'https://cirosantilli.com/linux-kernel-module-cheat'
consts['asm_ext'] = '.S' consts['asm_ext'] = '.S'
consts['c_ext'] = '.c' consts['c_ext'] = '.c'

View File

@@ -260,7 +260,7 @@ gnu_extension_properties = {
'cc_pedantic': False, 'cc_pedantic': False,
'cxx_std': 'gnu++17' 'cxx_std': 'gnu++17'
} }
# https://github.com/cirosantilli/linux-kernel-module-cheat#freestanding-programs # https://cirosantilli.com/linux-kernel-module-cheat#freestanding-programs
freestanding_properties = { freestanding_properties = {
'baremetal': False, 'baremetal': False,
'cc_flags': [ 'cc_flags': [
@@ -270,7 +270,7 @@ freestanding_properties = {
], ],
'extra_objs_lkmc_common': False, 'extra_objs_lkmc_common': False,
} }
# https://github.com/cirosantilli/linux-kernel-module-cheat#nostartfiles-programs # https://cirosantilli.com/linux-kernel-module-cheat#nostartfiles-programs
nostartfiles_properties = { nostartfiles_properties = {
'baremetal': False, 'baremetal': False,
'cc_flags': [ 'cc_flags': [

View File

@@ -1 +1 @@
https://github.com/cirosantilli/linux-kernel-module-cheat#freestanding-programs https://cirosantilli.com/linux-kernel-module-cheat#freestanding-programs

View File

@@ -1 +1 @@
https://github.com/cirosantilli/linux-kernel-module-cheat#nostartfiles-programs https://cirosantilli.com/linux-kernel-module-cheat#nostartfiles-programs

View File

@@ -1 +1 @@
https://github.com/cirosantilli/linux-kernel-module-cheat#freestanding-programs https://cirosantilli.com/linux-kernel-module-cheat#freestanding-programs

View File

@@ -1 +1 @@
https://github.com/cirosantilli/linux-kernel-module-cheat#freestanding-programs https://cirosantilli.com/linux-kernel-module-cheat#freestanding-programs