Merge pull request #571 from tomwilkie/travis

Run linter in travis; fix linter; make nameserver lint free.
This commit is contained in:
rade committed 2015-04-17 12:58:35 +01:00
commit ac2afdadb6
5 files changed
+9 -8

No files matched your search

+2 -1
View File
@@ -8,12 +8,13 @@ addons:
packages:
- libpcap-dev
install:
install:
- go clean -i net
- go install -tags netgo std
- make travis
script:
- bin/lint .
- make tests
after_success:
+3 -3
View File
@@ -63,11 +63,11 @@ function lint {
}
function lint_files {
result=0
lint_result=0
while read filename; do
lint "${filename}" || result=1
lint "${filename}" || lint_result=1
done
exit $result
exit $lint_result
}
function list_files {
+1 -1
View File
@@ -22,7 +22,7 @@ const (
defPendingTimeout int = 5 // timeout for a resolution
)
const nullTTL = 0 // a null TTL
const nullTTL = 0 // a null TTL
type entryStatus uint8
+2 -2
View File
@@ -278,7 +278,7 @@ func (s *DNSServer) rdnsHandler(proto dnsProtocol) dns.HandlerFunc {
lookups := []Lookup{s.Zone, s.mdnsCli}
maxLen := getMaxReplyLen(r, proto)
Debug.Printf("Reverse query: %+v", q)
Debug.Printf("Reverse query: %+v", q)
reply, err := s.cache.Get(r, maxLen, time.Now())
if err != nil {
if err == errNoLocalReplies {
@@ -300,7 +300,7 @@ func (s *DNSServer) rdnsHandler(proto dnsProtocol) dns.HandlerFunc {
// catch unsupported queries
if q.Qtype != dns.TypePTR {
Warning.Printf("[dns msgid %d] Unexpected reverse query type %s: %+v",
r.MsgHdr.Id, dns.TypeToString[q.Qtype], q)
r.MsgHdr.Id, dns.TypeToString[q.Qtype], q)
m := makeDNSNotImplResponse(r)
s.cache.Put(r, m, negLocalTTL, 0, now)
w.WriteMsg(m)
+1 -1
View File
@@ -53,7 +53,7 @@ func main() {
}
InitDefaultLogging(debug)
Info.Printf("WeaveDNS version %s\n", version) // first thing in log: the version
Info.Printf("WeaveDNS version %s\n", version) // first thing in log: the version
var zone = new(weavedns.ZoneDb)