• Greg Spencer's avatar
    Check sample links for malformed links (#137807) · f5a98353
    Greg Spencer authored
    ## Description
    
    This checks API doc strings for malformed links to examples. It prevents errors in capitalization, spacing, number of asterisks, etc.  It won't catch all errors, because it needs to have a minimally indicative string to know that it even is trying to be a link to an example.  At a minimum, the line needs to look like (literally, not as a regexp) `///*seecode.*` in order to be seen as a link to an example.
    
    Separately, I'm going to add a check to the snippets tool that checks to make sure that an `{@tool}` block includes either a link to a sample file or a dart code block.
    
    ## Tests
     - Added a test to make sure it catches some malformed links.
    f5a98353
check_code_samples_test.dart 11.2 KB