Skip to content

Commit

Permalink
For #67
Browse files Browse the repository at this point in the history
  • Loading branch information
ankritisingh committed Aug 27, 2024
1 parent ea3d877 commit 9b2aa11
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions src/ado/reprun.ado
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,31 @@ qui {
output_writetitle , outputcolumns("`outputcolumns'")
noi write_and_print_output, h_smcl(`h_smcl') ///
l1(`"{phang}Done checking file:{p_end}"') ///
l2(`"{pstd}{c BLC}{hline 1}> `dofile'{p_end}"') l3("{hline}")
file close `h_smcl'
l2(`"{pstd}{c BLC}{hline 1}> `dofile'{p_end}"') l3("{hline}")

if "`mmmflag'" != "" {
noi write_and_print_output, h_smcl(`h_smcl') ///
l1(" ") ///
l2(`"{pstd}{red:Reproducibility Warning:} Your code contains many-to-many merges on lines:`mmmflag'.{p_end}"') ///
l3(`"{pstd}As the {mansection D merge:Stata Manual} says: {it:if you think you need to perform an m:m merge, then we suspect you are wrong}.{p_end}"') ///
l4(`"{pstd}Reference the above section of the Stata Manual for troubleshooting.{p_end}"')

}

if "`sssflag'" != "" {
noi write_and_print_output, h_smcl(`h_smcl') ///
l1(" ") ///
l2(`"{pstd}{red:Reproducibility Warning:} Your code set the sortseed on lines:`sssflag'.{p_end}"') ///
l3(`"{pstd}As the {mansection D sort:Stata Manual} says: {it:You must be sure that the ordering really does not matter. If that is the case, then why did you sort in the first place?}{p_end}"') ///
l4(`"{pstd}Reference the above section of the Stata Manual for troubleshooting.{p_end}"')

}

if "`mmmflag'" != "" {
noi di as res `"{pstd}{red:Reproducibility Warning:} Your code contains many-to-many merges on lines:`mmmflag'.{p_end}"'
noi di as res `"{pstd}As the {mansection D merge:Stata Manual} says: {it:if you think you need to perform an m:m merge, then we suspect you are wrong}.{p_end}"'
noi di as res `"{pstd}Reference the above section of the Stata Manual for troubleshooting.{p_end}"'
}


if "`sssflag'" != "" {
noi di as res `" "'
noi di as res `"{pstd}{red:Reproducibility Warning:} Your code set the sortseed on lines:`sssflag'.{p_end}"'
noi di as res `"{pstd}As the {mansection D sort:Stata Manual} says: {it:You must be sure that the ordering really does not matter. If that is the case, then why did you sort in the first place?}{p_end}"'
noi di as res `"{pstd}Reference the above section of the Stata Manual for troubleshooting.{p_end}"'
}


file close `h_smcl'

/*****************************************************************************
Write smcl file to disk and clean up intermediate files unless debugging
Expand Down

0 comments on commit 9b2aa11

Please sign in to comment.