Let \(p\)  be an odd prime and \( \mathbb {F}_{p^m}\)  be a finite field of size \(p^m\) . An \([n,k,d]\)  code \(\mathcal {C}\)  over the finite field \(\mathbb {F}_{p^m}\)  is a \(k\) -dimensional linear subspace of \(\mathbb {F}_{p^m}^{n}\)  with minimum Hamming distance \(d\) . An \([n,k,d]\)  code is called distance-optimal if there dose not exist \([n,k,d+1]\)  code [1]}. The Hamming weight of a codeword \(c=(c_{0},c_{1},\cdots ,c_{n-1})\in \mathcal {C}\)  is the number of nonzero \(c_{i}\)  for \(0\le i\le n-1\) . Let \(A_{i}\)  denote the number of nonzero codewords with Hamming weight \(i\)  in \(\mathcal {C}\) . The weight enumerator of \(\mathcal {C}\)  is defined by \(1+A_{1}x+A_{2}x^2+\cdots +A_{n}x^n\)  and the sequence \((1,A_{1},\cdots ,A_{n})\)  is called the weight distribution of \(\mathcal {C}\) . The weight distribution of a code is used to estimate the error correcting capability and compute the error probability of error detection and correction of the code [2]}. The weight distributions of linear codes have also application in cryptography and combinatorics. Hence, the research of the weight distribution of a linear code is a hot topic in coding theory. The recent progress on weight distributions of linear codes can be seen in [3]}, [4]}, [5]}, [6]}, [7]}, [8]}, [9]}, [10]}, [11]}, [12]}, [13]}, [14]}, [15]}, [16]} and the references therein.
