Can I force an inspection error on duplicate function?
- 4
- 7
- Rob W
- Jan 29
Is it possible to trigger an inspection error for an identical functions defined at the same scope/block level?
Here is a contrived example:
Right now the code analysis is green and reports "no problems found". Instead I was expecting the analysis to be yellow with a warning about the duplicated function.
If I need to submit a YouTrack for an enhancement request, please let me know.
Cheers,
Rob
Here is a contrived example:
#!/usr/bin/env python
def foo(bar):
print("1\t%s" % bar)
def foo(bar):
print("2\t%s" % bar)
def foo(bar):
print("3\t%s" % bar)
foo('bar')
Right now the code analysis is green and reports "no problems found". Instead I was expecting the analysis to be yellow with a warning about the duplicated function.
If I need to submit a YouTrack for an enhancement request, please let me know.
Cheers,
Rob
At the moment PyCharm does not provide such an inspection. Feel free to file a YouTrack issue.
--
Dmitry Jemerov, Chief Technology Officer, JetBrains
Dmitry Jemerov, Chief Technology Officer, JetBrains
<< Newer
Older >>