pcdshub / pytmc

Generate EPICS IOCs and records from TwinCAT projects - along with many TwinCAT project tools
https://pcdshub.github.io/pytmc/
Other
10 stars 11 forks source link

FIX: be better about showing linter errors to user #113

Closed klauer closed 5 years ago

klauer commented 5 years ago

The behavior of the duplicate record checker from pytmc db meant that pytmc could bail silently, as discovered by @domitto.

Now, it will result in the following:

$ pytmc db GmdPlc-20190822.tmc
ERROR:pytmc.bin.db:Linter errors - failed to create database. To create the database ignoring these errors, use the flag `--allow-errors`
Traceback (most recent call last):
  File "/Users/klauer/docs/Repos/pytmc/pytmc/bin/db.py", line 194, in main
    show_error_context=not no_error_context,
  File "/Users/klauer/docs/Repos/pytmc/pytmc/bin/db.py", line 118, in process
    raise LinterError(message)
pytmc.bin.db.LinterError: Duplicate records encountered:
    fb_EM1K0_GMD_GCC_10:PRESS (2)
    fb_EM1K0_GMD_GCC_20:PRESS (2)
    fb_EM1K0_GMD_GCC_30:PRESS (2)
    fb_EM1K0_GMD_GCC_40:PRESS (2)
    fb_EM1K0_GMD_GCC_50:PRESS (2)
    fb_EM1K0_GMD_GCC_60:PRESS (2)
    fb_EM1K0_GMD_GCC_70:PRESS (2)
    fb_EM1K0_GMD_GPI_10:PRESS (2)
    fb_EM1K0_GMD_GPI_40:PRESS (2)
    fb_EM1K0_GMD_GPI_70:PRESS (2)
codecov-io commented 5 years ago

Codecov Report

Merging #113 into master will not change coverage. The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #113   +/-   ##
=======================================
  Coverage   74.58%   74.58%           
=======================================
  Files          15       15           
  Lines        1633     1633           
=======================================
  Hits         1218     1218           
  Misses        415      415
Impacted Files Coverage Δ
pytmc/bin/db.py 44.3% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 27fd4bc...ada46ec. Read the comment docs.