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

Fix style issues in IAR exporter #4598

Merged
merged 1 commit into from
Jun 26, 2017

Conversation

theotherjimmy
Copy link
Contributor

Some of this stuff began to bother me, so I fixed it.

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This does not change it, just for future that in our codebase: tgt vs target , we shall use full name for readability (of course if its not 50 characters long)

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 21, 2017

Travis failure

0.23s$ python tools/project.py -S
Traceback (most recent call last):
  File "tools/project.py", line 15, in <module>
    from tools.export import EXPORTERS, mcu_ide_matrix, mcu_ide_list, export_project, get_exporter_toolchain
  File "/home/travis/build/ARMmbed/mbed-os/tools/export/__init__.py", line 31, in <module>
    from tools.export import lpcxpresso, ds5_5, iar, makefile
  File "/home/travis/build/ARMmbed/mbed-os/tools/export/iar/__init__.py", line 17, in <module>
    class IAR(Exporter):
  File "/home/travis/build/ARMmbed/mbed-os/tools/export/iar/__init__.py", line 33, in IAR
    _iar_support(obj, IAR_DEFS.keys())]
NameError: name '_iar_support' is not defined
``

@theotherjimmy
Copy link
Contributor Author

Huh.

@theotherjimmy
Copy link
Contributor Author

This does not change it, just for future that in our codebase: tgt vs target , we shall use full name for readability (of course if its not 50 characters long)

No we "shall" not. target can be a function name. If it is, don't create a local variable that shadows it.

@adbridge
Copy link
Contributor

/morph export-build

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph export-build

Output

mbed Build Number: 74

All exports and builds passed!

@theotherjimmy
Copy link
Contributor Author

@0xc0170 and I discussed variable naming offline, and came to the conclusion that tgt and target are both bad, and neither should be used. The word "target" is overloaded like it's going out of style in this codebase, so we should avoid confusion by being more specific. I opted for mcu here.

@theotherjimmy theotherjimmy merged commit e57296d into ARMmbed:master Jun 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants