Changeset 12


Ignore:
Timestamp:
10/21/15 12:23:59 (9 years ago)
Author:
pinsard
Message:

describe how to check typo on source files

Location:
trunk/docs/manual/source/developers/guides
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/manual/source/developers/guides/typo.rst

    r11 r12  
    1111:command:`pylint` can also be used for Python source. 
    1212 
    13 They use dictionaries providing natural langages list of words. 
     13They use dictionaries providing natural languages list of words. 
    1414 
    1515Here is the flow 
     
    2121 
    2222System dictionaries lack some scientific words (ex barocline), 
    23 computer langages reserved words, acronyms (ex. IGCMG) and 
     23computer languages reserved words, acronyms (ex. IGCMG) and 
    2424code variables names. 
    2525 
     
    108108   sed -e "s@^@http://forge.ipsl.jussieu.fr@" > ${list_href} 
    109109   trac_uri=${PROJECT_LOG}/trac_uri 
    110    sed -e "s@^@http://forge.ipsl.jussieu.fr/igcmg_doc/wiki/@"  ${PROJECT}/docs/manual/for_tracwiki/tracpages.txt  sort -u > ${trac_uri} 
     110   sed -e "s@^@http://forge.ipsl.jussieu.fr/igcmg_doc/wiki/@"  ${PROJECT}/docs/manual/for_tracwiki/tracpages.txt | sort -u > ${trac_uri} 
    111111   list_uri=$(comm  -13 ${trac_uri} ${list_href}) 
    112112 
     
    148148 
    149149- typo to be fixed in wiki pages 
    150 - false positif to be added in a :file:`docs/manual/for_typo/` 
    151 - false positif to be ignored because too hard to add (encoding issue for 
     150- false positive to be added in a :file:`docs/manual/for_typo/` 
     151- false positive to be ignored because too hard to add (encoding issue for 
    152152  Greek word, etc.) 
    153153 
     
    176176 
    177177   It is also possible to find wrong spelling via the search facility 
    178    on the trac interface but resultats may differ (case sensitivity, 
     178   on the trac interface but results may differ (case sensitivity, 
    179179   trac plugins) 
    180180 
     
    245245 
    246246- typo to be fixed in PDF files 
    247 - false positif to be added in a :file:`docs/manual/for_typo/` 
    248 - false positif to be ignored because bad convertion from PDF to text 
     247- false positive to be added in a :file:`docs/manual/for_typo/` 
     248- false positive to be ignored because bad conversion from PDF to text 
    249249  (ie ligature), too hard to add (encoding issue for Greek word, etc.) 
    250250 
     
    255255   w=infrastucture # take a real one from ${hunspell_out_uniq} 
    256256   find ${dirpdf} -type f -name "*.pdf.txt" -exec grep -Hi ${w} {} \; 
     257 
     258Check typo in :file:`libIGCM` source files 
     259++++++++++++++++++++++++++++++++++++++++++ 
     260 
     261Assuming modipsl has been downloaded following  
     262https://forge.ipsl.jussieu.fr/igcmg_doc/wiki/DocCinstall#Description 
     263in :envvar:`MODIPSL`. 
     264 
     265We can check typo in source files 
     266 
     267.. code-block:: bash 
     268 
     269   cd ${PROJECT_LOG} 
     270   listf=$(find ${MODIPSL} -path '*/.svn' -prune -o -type f) 
     271   hunspell_out=${PROJECT_LOG}/hunspell_out 
     272   hunspell_out_uniq=${PROJECT_LOG}/hunspell_out_uniq 
     273   rm -f ${hunspell_out}  ${hunspell_out_uniq} 
     274   for onefile in ${listf} 
     275   do 
     276      LC_ALL=C;hunspell -d en_US,nontypo_uniq --check-url -i utf-8 -l < ${onefile} >> ${hunspell_out} 
     277   done 
     278   sort -u ${hunspell_out} | sort --ignore-case > ${hunspell_out_uniq} 
     279 
     280:file:`${hunspell_out_uniq}` contains : 
     281 
     282- typo to be fixed in source files 
     283- false positive to be added in a :file:`docs/manual/for_typo/` 
     284- false positive to be ignored because encoding issue 
     285 
     286To find one of the wrong spelling in sources files: 
     287 
     288.. code-block:: bash 
     289 
     290   w=destionation # take a real one from ${hunspell_out_uniq} 
     291   find ${MODIPSL} -path '*/.svn' -prune -o -type f -exec grep -Hi ${w} {} \; 
     292 
     293.. warning:: 
     294 
     295   Correction have to be done in working space and committed 
Note: See TracChangeset for help on using the changeset viewer.