Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: epicsArchChecker fails to detect if the last alias is missing a pv #220

Open
KaushikMalapati opened this issue Nov 15, 2024 · 0 comments

Comments

@KaushikMalapati
Copy link
Contributor

Expected Behavior

epicsArchChecker should print messages telling the user that there are aliases with no pv if there are any anywhere in the arch file.

Current Behavior

If there are mutliple aliases and the last alias has no pv, it will not cause a warning to print even though it should. All but the last alias will cause prints if they don't have correspoding pvs.

Possible Solution

The problem is probably somewhere in the for loop in read_file. I think it might be because we only add alias to the extra keys list if we find another key before finding a line starting with an alnum char, so it's impossible for the last key alias to reach that case

extraKeys.append((key, filename, keyline))

Steps to Reproduce (for bugs)

  1. Use this as the arch file
*Port_0_MCP_Front
TMO:MPOD:01:M0:C0:VoltageMeasure ca

*Port_1_MCP_Front
#TMO:MPOD:01:M0:C1:VoltageMeasure ca

#test
  1. Run epicsArchChecker on it
  2. Notice that there is no error even though the last alias clearly has no pv.

Context

Found it by accident while working on #219. Hasn't affected me, but it would be unfortunate if the script failed to catch an error because it happened to be at the end of the file and it caused daq problems. It would be hard to diagnose because this script would incorrectly tell people that the arch file is not the problem.

Your Environment

n/a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant