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

tools: fix emacs configuration file #5275

Merged
merged 1 commit into from
Nov 4, 2019

Conversation

rzalamena
Copy link
Member

Summary

It was missing a set of parentheses and a dot before `indent-tabs-mode'.

More information here:
https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html#Directory-Variables

Extra

I also have a extra configuration for flycheck:

((c-mode . (
            ;; Add path to `lib' and `config.h' so flycheck can find them
            ;; (include path are relative to the open file).
            (flycheck-gcc-include-path . ("." "../" "../lib"))
            (flycheck-clang-include-path . ("." "../" "../lib"))
            ;; Tell the compiler about the makefile guards.
            (flycheck-gcc-args . ("-std=gnu11"
                                  "-DHAVE_CONFIG_H"
                                  "-Wall"
                                  "-Wextra"
                                  "-Wstrict-prototypes"
                                  "-Wmissing-prototypes"
                                  "-Wmissing-declarations"
                                  "-Wshadow"
                                  "-Wpointer-arith"
                                  "-Wconversion"
                                  "-Wpacked"
                                  "-Wswitch-enum"
                                  "-Wimplicit-fallthrough"
                                  "-Wsuggest-attribute=const"
                                  "-Wsuggest-attribute=malloc"
                                  "-Walloc-zero"))
            (flycheck-clang-args . ("-std=gnu11"
                                    "-DHAVE_CONFIG_H"
                                    "-Wall"
                                    "-Wextra"
                                    "-Wstrict-prototypes"
                                    "-Wmissing-prototypes"
                                    "-Wmissing-declarations"
                                    "-Wshadow"
                                    "-Wpointer-arith"
                                    "-Wconversion"
                                    "-Wpacked"
                                    "-Wswitch-enum"
                                    "-Wimplicit-fallthrough"
                                    "-Wsuggest-attribute=const"
                                    "-Wsuggest-attribute=malloc"
                                    "-Walloc-zero"))
            )))

The snippet above can be added to .dir-locals.el or to .dir-locals-2.el (if using recent emacs version) to enable more flycheck warnings. flycheck can be found as a package in emacs melpa repositories and you'll also need flycheck-clang-analyzer for the clang compiler.

NOTE: emacs will warn/ask you about the flycheck variables since you could theoretically pass malicious arguments.

It was missing a set of parentheses and a dot before
`indent-tabs-mode'.

More information here:
https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html#Directory-Variables

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
@rzalamena rzalamena added the tools label Nov 4, 2019
@Jafaral Jafaral self-requested a review November 4, 2019 15:13
@LabN-CI
Copy link
Collaborator

LabN-CI commented Nov 4, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/5275 3a0f661
Date 11/04/2019
Start 10:32:06
Finish 10:53:50
Run-Time 21:44
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-11-04-10:32:06.txt
Log autoscript-2019-11-04-10:32:59.log.bz2
Memory 436 425 360

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-9589/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

@Jafaral Jafaral merged commit ba3afa4 into FRRouting:master Nov 4, 2019
@rzalamena rzalamena deleted the emacs-conf branch November 22, 2019 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants