Skip to content

doc: remove obsolete line from doccheck#7217

Closed
OlegHahm wants to merge 1 commit intoRIOT-OS:masterfrom
OlegHahm:doccheck_remove_obsolete_line
Closed

doc: remove obsolete line from doccheck#7217
OlegHahm wants to merge 1 commit intoRIOT-OS:masterfrom
OlegHahm:doccheck_remove_obsolete_line

Conversation

@OlegHahm
Copy link
Copy Markdown
Member

No description provided.

@OlegHahm OlegHahm added Area: doc Area: Documentation Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Area: tests Area: tests and testing framework Area: tools Area: Supplementary tools labels Jun 21, 2017
@OlegHahm OlegHahm added this to the Release 2017.07 milestone Jun 21, 2017
@OlegHahm OlegHahm requested a review from miri64 June 21, 2017 14:55

RIOTBASE=$(readlink -f "$(dirname $(realpath $0))/../../..")

ERRORS=$(make doc 2>&1 | grep '.*warning' | sed "s#${PWD}/\([^:]*\)#\1#g")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't RIOTBASE rather be used in this line?

make -C "${RIOTBASE}" doc 2>&1 ....

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't make a difference: make doc can only be called from ${RIOTBASE} anyway.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but if you call this script from any other location than ${RIOTBASE} it will succeed as a false positive (without actually executing doxygen).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping @OlegHahm? Scripts you have to call from a certain directory suck IMHO ;-)

@miri64
Copy link
Copy Markdown
Member

miri64 commented Jun 27, 2017

ping @OlegHahm

@miri64
Copy link
Copy Markdown
Member

miri64 commented Nov 15, 2017

@OlegHahm I don't remember the context of this PR, but the line doesn't look obsolete to me. Can you maybe update the description with your reasoning. Regardless, I think the following patch would work much better, as you won't get false positives for this script from any directory:

diff --git a/dist/tools/doccheck/check.sh b/dist/tools/doccheck/check.sh
index ef618fb..f5aa09c 100755
--- a/dist/tools/doccheck/check.sh
+++ b/dist/tools/doccheck/check.sh
@@ -8,7 +8,7 @@
 
 RIOTBASE=$(readlink -f "$(dirname $(realpath $0))/../../..")
 
-ERRORS=$(make doc 2>&1 | grep '.*warning' | sed "s#${PWD}/\([^:]*\)#\1#g")
+ERRORS=$(make -C "${RIOTBASE}" doc 2>&1 | grep '.*warning' | sed "s#${PWD}/\([^:]*\)#\1#g")
 
 if [ -n "${ERRORS}" ]
 then

@smlng
Copy link
Copy Markdown
Member

smlng commented Dec 6, 2017

@miri64 your patch would allow to call doccheck script from anywhere not just from RIOTBASE, right?
Please provide a PR (or did you already?) to show that and making this one obsolete and btw. contested.

@smlng smlng added the Discussion: contested The item of discussion was contested label Dec 6, 2017
miri64 added a commit to miri64/RIOT that referenced this pull request Dec 7, 2017
The doccheck script reports reports a false positive when executed from
any directory but `RIOTBASE`. With this fix, `make doc` changes into
the currently unused `RIOTBASE` variable.

This is an alternative approach to RIOT-OS#7217, which removes this variable,
but keeps the false positive aspect of the script untouched.
@miri64
Copy link
Copy Markdown
Member

miri64 commented Dec 7, 2017

@OlegHahm @smlng see #8220

@miri64
Copy link
Copy Markdown
Member

miri64 commented Dec 18, 2017

#8220 has been merged

@miri64 miri64 closed this Dec 18, 2017
shr70 pushed a commit to Josar/RIOT that referenced this pull request Dec 18, 2017
The doccheck script reports reports a false positive when executed from
any directory but `RIOTBASE`. With this fix, `make doc` changes into
the currently unused `RIOTBASE` variable.

This is an alternative approach to RIOT-OS#7217, which removes this variable,
but keeps the false positive aspect of the script untouched.
panail pushed a commit to panail/RIOT that referenced this pull request Oct 29, 2018
The doccheck script reports reports a false positive when executed from
any directory but `RIOTBASE`. With this fix, `make doc` changes into
the currently unused `RIOTBASE` variable.

This is an alternative approach to RIOT-OS#7217, which removes this variable,
but keeps the false positive aspect of the script untouched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: doc Area: Documentation Area: tests Area: tests and testing framework Area: tools Area: Supplementary tools Discussion: contested The item of discussion was contested Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants