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

F/missing py license (Python, Perl and Bash scripts were missing declarations) #985

Merged
merged 5 commits into from
Apr 2, 2016

Conversation

bkil-syslogng
Copy link
Contributor

Also enabled automatic checking in the future for the most important non-C kinds (e.g., Java).

@@ -0,0 +1,22 @@
#!/usr/bin/env python
#############################################################################
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we need a shebang line here and neither of other modules in the same package.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bazsi

  1. Some of the Python files contained this, some of them did not. I wanted to make it uniform.
  2. I recommend using a shebang in each and every script to make file magic consistent on all platforms.

In light of these, do you agree?

Copy link
Collaborator

Choose a reason for hiding this comment

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

executable scripts contained this, whereas modules to be imported didn't.
having a shebang line indicates that the file would be executable, which
they are not.

Bazsi

On Mon, Mar 21, 2016 at 10:22 AM, Tamas Nagy notifications@github.com
wrote:

In modules/python/pylib/syslogng/init.py
#985 (comment):

@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+#############################################################################

@bazsi https://github.com/bazsi

  1. Some of the Python files contained this, some of them did not. I wanted
    to make it uniform.
  2. I recommend using a shebang in each and every script to make file magic
    consistent on all platforms.

In light of these, do you agree?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/balabit/syslog-ng/pull/985/files/4bd9d6e8f9bcba316d6ae8b02b701ffa4d85f6ea#r56795686

@bazsi
Copy link
Collaborator

bazsi commented Mar 21, 2016

Apart from my nitpicks wrt shebang lines, this looks great, thank you.

@bkil-syslogng
Copy link
Contributor Author

@bazsi I've added two new commits to remove redundant shebangs. Please notify me after you have reviewed them, so I can squash the fixup.

@bazsi
Copy link
Collaborator

bazsi commented Mar 23, 2016

ok on my part, thanks for the fixups.

@@ -22,6 +22,6 @@ modules/native
GPLv2+_SSL
tests
modules/java/(tools|[^/]*$)
modules/java-modules/(dummy|elastic|hdfs|http|kafka|[^/]*$)
modules/java-modules/(dummy|elastic|elastic-v2|hdfs|http|kafka|[^/]*$)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm... we should add every new module to this file?
That will always be a problem...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we do need to add each one when using the current format. This is because we have both GPL and non-GPL modules in the same folder, and I don't want to add overlapping patterns and row based prioritization, because that can bite us very quickly without ever noticing. As a side note, currently, overlapping declarations produce an error (e.g., the containing folder under GPL and subfolders under LGPL).

After these improvements are merged, this check (and Travis) should always tell you if you forgot to add a module and it should also point out which one. The omission was on my part that I forgot to check .java files, so that's why you didn't get a notification about it before.

@lbudai
Copy link
Collaborator

lbudai commented Apr 1, 2016

@bkil-syslogng : could you squash the patches?

Signed-off-by: bkil-syslogng <tamas.nagy@balabit.com>
Signed-off-by: bkil-syslogng <tamas.nagy@balabit.com>
Signed-off-by: bkil-syslogng <tamas.nagy@balabit.com>
* Support parsing .ac, .am, .sh, .java, .pl and .py files
* Ignore built ones
* List further extensions to ignore
* Fix handling regexp escaping when reading policy

Signed-off-by: bkil-syslogng <tamas.nagy@balabit.com>
Signed-off-by: bkil-syslogng <tamas.nagy@balabit.com>
@bkil-syslogng
Copy link
Contributor Author

@bazsi bazsi merged commit 5ca68be into syslog-ng:master Apr 2, 2016
@bazsi bazsi removed the needs-review label Apr 2, 2016
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.

3 participants