-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add an optional expection to library_008
for the work library
#1030
Comments
Evening @JHertz5 , I'm wondering if this should be more generic such that if a library ieee;
use ieee.std_logic_1164.all;
entity fifo is
end entity fifo;
library my_lib;
use my_lib.my_package.all;
use ieee.numeric_std.all;
use work.my_other_package.all;
architecture rtl of fifo is
begin
end architecture rtl; It would seem we would want Thoughts? I am going to check what it will take to implement the conditional indenting. --Jeremy |
Good Evening @JHertz5 , I pushed an update for this to the In order to get the indenting you would like you need to add the following to your configuration: 1 indent:
2 tokens:
3 use_clause:
4 keyword:
5 token : current
6 after : current
7 token_after_library_clause: '+1'
8 token_if_no_matching_library_clause: current Technically you do not need lines 5, 6 or 7, but it is nice to be complete. In case you have not run across the documentation for indent here is a link. The I also need to update my testing. Can you give this a try on your side and let me know how it goes. Thanks, --Jeremy |
Hey @JHertz5 , Documentation and tests are committed. Let me know what you think. --Jeremy |
Hi @jeremiah-c-leary. Thanks so much for this! I totally agree with you, the generic approach is the way to go. I have tested the branch and it works as desired with the configuration that you mentioned above. I also had a read of the new documentation. One potential mistake that I spotted is that the code examples in configuring_use_clause_indenting.rst appear to be missing the |
Afternoon @JHertz5 , Good catch on the missing --Jeremy |
@jeremiah-c-leary Awesome, thanks very much! It looks good to me. |
Sweet, I will merge this to master. --Jeremy |
Is your feature request related to a problem? Please describe.
Following on from discussion in #969, it would be useful to have an option to left-align
use
delcarations that refer to the work library (since there will be nolibrary
declaration for the work library, so arguably there is nothing to indent against).Describe the solution you'd like
I would like an option on rule
library_008
that left-indentsuse
statements if they refer to the work library. This option would allow the following code to be legal:The text was updated successfully, but these errors were encountered: